Reduce the amount of included header files. Vast change like in "Oh God! This revision changes half of the source files!".
Review URL: http://codereview.chromium.org/20378 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9958 0039d316-1c4b-4281-b951-d872f2087c98
Esse commit está contido em:
@@ -9,7 +9,6 @@
|
||||
#define BASE_ATOMIC_REF_COUNT_H_
|
||||
|
||||
#include "base/atomicops.h"
|
||||
#include "base/basictypes.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#define BASE_REF_COUNTED_H_
|
||||
|
||||
#include "base/atomic_ref_count.h"
|
||||
#include "base/basictypes.h"
|
||||
#include "base/thread_collision_warner.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef BASE_REVOCABLE_STORE_H__
|
||||
#define BASE_REVOCABLE_STORE_H__
|
||||
#ifndef BASE_REVOCABLE_STORE_H_
|
||||
#define BASE_REVOCABLE_STORE_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/ref_counted.h"
|
||||
|
||||
// |RevocableStore| is a container of items that can be removed from the store.
|
||||
@@ -73,5 +71,4 @@ class RevocableStore {
|
||||
DISALLOW_EVIL_CONSTRUCTORS(RevocableStore);
|
||||
};
|
||||
|
||||
#endif // BASE_REVOCABLE_STORE_H__
|
||||
|
||||
#endif // BASE_REVOCABLE_STORE_H_
|
||||
|
||||
+3
-8
@@ -2,16 +2,12 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef BASE_TASK_H__
|
||||
#define BASE_TASK_H__
|
||||
#ifndef BASE_TASK_H_
|
||||
#define BASE_TASK_H_
|
||||
|
||||
#include <set>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/non_thread_safe.h"
|
||||
#include "base/revocable_store.h"
|
||||
#include "base/time.h"
|
||||
#include "base/tracked.h"
|
||||
#include "base/tuple.h"
|
||||
|
||||
@@ -667,5 +663,4 @@ class UnboundMethod {
|
||||
Params p_;
|
||||
};
|
||||
|
||||
#endif // BASE_TASK_H__
|
||||
|
||||
#endif // BASE_TASK_H_
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#include "chrome/common/pref_service.h"
|
||||
#include "googleurl/src/url_util.h"
|
||||
#include "net/base/escape.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/url_request/url_request_status.h"
|
||||
|
||||
#include "generated_resources.h"
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "chrome/views/window.h"
|
||||
#include "chrome/test/automation/automation_messages.h"
|
||||
#include "net/base/cookie_monster.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/url_request/url_request_filter.h"
|
||||
|
||||
using base::Time;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "base/message_loop.h"
|
||||
#include "base/string_util.h"
|
||||
#include "net/base/net_util.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/url_request/url_request_filter.h"
|
||||
|
||||
static const char kMockHostname[] = "mock.http";
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "base/message_loop.h"
|
||||
#include "base/string_util.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "net/url_request/url_request_filter.h"
|
||||
|
||||
|
||||
@@ -8,14 +8,13 @@
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/gfx/png_encoder.h"
|
||||
#include "base/histogram.h"
|
||||
#include "base/message_loop.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/perftimer.h"
|
||||
#include "base/singleton.h"
|
||||
#include "base/string_util.h"
|
||||
#include "net/base/cookie_monster.h"
|
||||
#include "net/url_request/url_request_error_job.h"
|
||||
#include "chrome/browser/browser_list.h"
|
||||
#include "chrome/browser/chrome_plugin_browsing_context.h"
|
||||
#include "chrome/browser/chrome_thread.h"
|
||||
@@ -37,12 +36,10 @@
|
||||
#include "chrome/common/net/url_request_intercept_job.h"
|
||||
#include "chrome/common/plugin_messages.h"
|
||||
#include "chrome/common/render_messages.h"
|
||||
|
||||
#include "base/gfx/png_encoder.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/string_util.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "net/base/base64.h"
|
||||
#include "net/base/cookie_monster.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/url_request/url_request_error_job.h"
|
||||
#include "skia/include/SkBitmap.h"
|
||||
|
||||
using base::TimeDelta;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/values.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/debugger/debugger_contents.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "base/json_reader.h"
|
||||
#include "base/json_writer.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/values.h"
|
||||
#include "chrome/common/l10n_util.h"
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "base/message_loop.h"
|
||||
#include "base/registry.h"
|
||||
#include "base/scoped_ptr.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/thread.h"
|
||||
#include "chrome/browser/browser.h"
|
||||
#include "chrome/browser/browser_process_impl.h"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "chrome/common/pref_service.h"
|
||||
#include "net/base/load_flags.h"
|
||||
#include "net/url_request/url_request_status.h"
|
||||
|
||||
const char GoogleURLTracker::kDefaultGoogleHomepage[] =
|
||||
"http://www.google.com/";
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "chrome/browser/net/url_fetcher.h"
|
||||
#include "chrome/common/notification_observer.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
|
||||
class PrefService;
|
||||
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef CHROME_BROWSER_IME_INPUT_H__
|
||||
#define CHROME_BROWSER_IME_INPUT_H__
|
||||
#ifndef CHROME_BROWSER_IME_INPUT_H_
|
||||
#define CHROME_BROWSER_IME_INPUT_H_
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/gfx/Rect.h"
|
||||
#include "base/gfx/rect.h"
|
||||
|
||||
// This header file defines a struct and a class used for encapsulating IMM32
|
||||
// APIs, controls IMEs attached to a window, and enables the 'on-the-spot'
|
||||
@@ -303,5 +303,4 @@ class ImeInput {
|
||||
DISALLOW_EVIL_CONSTRUCTORS(ImeInput);
|
||||
};
|
||||
|
||||
#endif // #ifndef CHROME_BROWSER_IME_INPUT_H__
|
||||
|
||||
#endif // #ifndef CHROME_BROWSER_IME_INPUT_H_
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "chrome/browser/jsmessage_box_handler_win.h"
|
||||
|
||||
#include "base/string_util.h"
|
||||
#include "chrome/browser/app_modal_dialog_queue.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/profile.h"
|
||||
|
||||
@@ -6,17 +6,9 @@
|
||||
#include <psapi.h>
|
||||
|
||||
#include "base/file_version_info.h"
|
||||
#include "base/histogram.h"
|
||||
#include "base/image_util.h"
|
||||
#include "base/message_loop.h"
|
||||
#include "base/process_util.h"
|
||||
#include "base/scoped_ptr.h"
|
||||
#include "base/thread.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/chrome_thread.h"
|
||||
#include "chrome/browser/renderer_host/render_process_host.h"
|
||||
#include "chrome/browser/renderer_host/render_view_host.h"
|
||||
#include "chrome/browser/tab_contents/tab_contents.h"
|
||||
#include "chrome/browser/tab_contents/web_contents.h"
|
||||
#include "chrome/common/child_process_host.h"
|
||||
|
||||
|
||||
@@ -5,11 +5,8 @@
|
||||
#ifndef CHROME_BROWSER_MEMORY_DETAILS_H_
|
||||
#define CHROME_BROWSER_MEMORY_DETAILS_H_
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/process_util.h"
|
||||
#include "base/ref_counted.h"
|
||||
#include "chrome/common/child_process_info.h"
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "chrome/common/notification_service.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "chrome/common/pref_service.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "net/base/dns_resolution_observer.h"
|
||||
|
||||
using base::TimeDelta;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "chrome/browser/net/dns_master.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <set>
|
||||
|
||||
#include "base/histogram.h"
|
||||
#include "base/stats_counters.h"
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "chrome/browser/net/sdch_dictionary_fetcher.h"
|
||||
|
||||
#include "chrome/browser/profile.h"
|
||||
#include "net/url_request/url_request_status.h"
|
||||
|
||||
void SdchDictionaryFetcher::Schedule(const GURL& dictionary_url) {
|
||||
// Avoid pushing duplicate copy onto queue. We may fetch this url again later
|
||||
|
||||
@@ -12,9 +12,87 @@
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "net/base/load_flags.h"
|
||||
#include "net/base/io_buffer.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
|
||||
static const int kBufferSize = 4096;
|
||||
|
||||
class URLFetcher::Core
|
||||
: public base::RefCountedThreadSafe<URLFetcher::Core>,
|
||||
public URLRequest::Delegate {
|
||||
public:
|
||||
// For POST requests, set |content_type| to the MIME type of the content
|
||||
// and set |content| to the data to upload. |flags| are flags to apply to
|
||||
// the load operation--these should be one or more of the LOAD_* flags
|
||||
// defined in url_request.h.
|
||||
Core(URLFetcher* fetcher,
|
||||
const GURL& original_url,
|
||||
RequestType request_type,
|
||||
URLFetcher::Delegate* d);
|
||||
|
||||
// Starts the load. It's important that this not happen in the constructor
|
||||
// because it causes the IO thread to begin AddRef()ing and Release()ing
|
||||
// us. If our caller hasn't had time to fully construct us and take a
|
||||
// reference, the IO thread could interrupt things, run a task, Release()
|
||||
// us, and destroy us, leaving the caller with an already-destroyed object
|
||||
// when construction finishes.
|
||||
void Start();
|
||||
|
||||
// Stops any in-progress load and ensures no callback will happen. It is
|
||||
// safe to call this multiple times.
|
||||
void Stop();
|
||||
|
||||
// URLRequest::Delegate implementations
|
||||
virtual void OnReceivedRedirect(URLRequest* request,
|
||||
const GURL& new_url) { }
|
||||
virtual void OnResponseStarted(URLRequest* request);
|
||||
virtual void OnReadCompleted(URLRequest* request, int bytes_read);
|
||||
|
||||
private:
|
||||
// Wrapper functions that allow us to ensure actions happen on the right
|
||||
// thread.
|
||||
void StartURLRequest();
|
||||
void CancelURLRequest();
|
||||
void OnCompletedURLRequest(const URLRequestStatus& status);
|
||||
|
||||
URLFetcher* fetcher_; // Corresponding fetcher object
|
||||
GURL original_url_; // The URL we were asked to fetch
|
||||
GURL url_; // The URL we eventually wound up at
|
||||
RequestType request_type_; // What type of request is this?
|
||||
URLFetcher::Delegate* delegate_; // Object to notify on completion
|
||||
MessageLoop* delegate_loop_; // Message loop of the creating thread
|
||||
MessageLoop* io_loop_; // Message loop of the IO thread
|
||||
URLRequest* request_; // The actual request this wraps
|
||||
int load_flags_; // Flags for the load operation
|
||||
int response_code_; // HTTP status code for the request
|
||||
std::string data_; // Results of the request
|
||||
scoped_refptr<net::IOBuffer> buffer_;
|
||||
// Read buffer
|
||||
scoped_refptr<URLRequestContext> request_context_;
|
||||
// Cookie/cache info for the request
|
||||
ResponseCookies cookies_; // Response cookies
|
||||
std::string extra_request_headers_;// Extra headers for the request, if any
|
||||
scoped_refptr<net::HttpResponseHeaders> response_headers_;
|
||||
|
||||
std::string upload_content_; // HTTP POST payload
|
||||
std::string upload_content_type_; // MIME type of POST payload
|
||||
|
||||
// The overload protection entry for this URL. This is used to
|
||||
// incrementally back off how rapidly we'll send requests to a particular
|
||||
// URL, to avoid placing too much demand on the remote resource. We update
|
||||
// this with the status of all requests as they return, and in turn use it
|
||||
// to determine how long to wait before making another request.
|
||||
URLFetcherProtectEntry* protect_entry_;
|
||||
// |num_retries_| indicates how many times we've failed to successfully
|
||||
// fetch this URL. Once this value exceeds the maximum number of retries
|
||||
// specified by the protection manager, we'll give up.
|
||||
int num_retries_;
|
||||
|
||||
friend class URLFetcher;
|
||||
DISALLOW_COPY_AND_ASSIGN(Core);
|
||||
};
|
||||
|
||||
URLFetcher::URLFetcher(const GURL& url,
|
||||
RequestType request_type,
|
||||
Delegate* d)
|
||||
@@ -184,3 +262,38 @@ void URLFetcher::Core::OnCompletedURLRequest(const URLRequestStatus& status) {
|
||||
cookies_, data_);
|
||||
}
|
||||
}
|
||||
|
||||
void URLFetcher::set_io_loop(MessageLoop* io_loop) {
|
||||
core_->io_loop_ = io_loop;
|
||||
}
|
||||
|
||||
void URLFetcher::set_upload_data(const std::string& upload_content_type,
|
||||
const std::string& upload_content) {
|
||||
core_->upload_content_type_ = upload_content_type;
|
||||
core_->upload_content_ = upload_content;
|
||||
}
|
||||
|
||||
void URLFetcher::set_load_flags(int load_flags) {
|
||||
core_->load_flags_ = load_flags;
|
||||
}
|
||||
|
||||
void URLFetcher::set_extra_request_headers(
|
||||
const std::string& extra_request_headers) {
|
||||
core_->extra_request_headers_ = extra_request_headers;
|
||||
}
|
||||
|
||||
void URLFetcher::set_request_context(URLRequestContext* request_context) {
|
||||
core_->request_context_ = request_context;
|
||||
}
|
||||
|
||||
net::HttpResponseHeaders* URLFetcher::response_headers() const {
|
||||
return core_->response_headers_;
|
||||
}
|
||||
|
||||
void URLFetcher::Start() {
|
||||
core_->Start();
|
||||
}
|
||||
|
||||
const GURL& URLFetcher::url() const {
|
||||
return core_->url_;
|
||||
}
|
||||
|
||||
@@ -7,15 +7,22 @@
|
||||
// reading. This is useful for callers who simply want to get the data from a
|
||||
// URL and don't care about all the nitty-gritty details.
|
||||
|
||||
#ifndef CHROME_BROWSER_URL_FETCHER_H__
|
||||
#define CHROME_BROWSER_URL_FETCHER_H__
|
||||
#ifndef CHROME_BROWSER_URL_FETCHER_H_
|
||||
#define CHROME_BROWSER_URL_FETCHER_H_
|
||||
|
||||
#include "base/message_loop.h"
|
||||
#include "base/ref_counted.h"
|
||||
#include "chrome/browser/net/url_fetcher_protect.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
|
||||
class GURL;
|
||||
typedef std::vector<std::string> ResponseCookies;
|
||||
class URLFetcher;
|
||||
class URLRequestContext;
|
||||
class URLRequestStatus;
|
||||
|
||||
namespace net {
|
||||
class HttpResponseHeaders;
|
||||
}
|
||||
|
||||
// To use this class, create an instance with the desired URL and a pointer to
|
||||
// the object to be notified when the URL has been loaded:
|
||||
@@ -74,59 +81,44 @@ class URLFetcher {
|
||||
// |d| the object that will receive the callback on fetch completion.
|
||||
URLFetcher(const GURL& url, RequestType request_type, Delegate* d);
|
||||
|
||||
~URLFetcher();
|
||||
|
||||
// This should only be used by unittests, where g_browser_process->io_thread()
|
||||
// does not exist and we must specify an alternate loop. Unfortunately, we
|
||||
// can't put it under #ifdef UNIT_TEST since some callers (which themselves
|
||||
// should only be reached in unit tests) use this. See
|
||||
// chrome/browser/feeds/feed_manager.cc.
|
||||
void set_io_loop(MessageLoop* io_loop) {
|
||||
core_->io_loop_ = io_loop;
|
||||
}
|
||||
void set_io_loop(MessageLoop* io_loop);
|
||||
|
||||
// Sets data only needed by POSTs. All callers making POST requests should
|
||||
// call this before the request is started. |upload_content_type| is the MIME
|
||||
// type of the content, while |upload_content| is the data to be sent (the
|
||||
// Content-Length header value will be set to the length of this data).
|
||||
void set_upload_data(const std::string& upload_content_type,
|
||||
const std::string& upload_content) {
|
||||
core_->upload_content_type_ = upload_content_type;
|
||||
core_->upload_content_ = upload_content;
|
||||
}
|
||||
const std::string& upload_content);
|
||||
|
||||
// Set one or more load flags as defined in net/base/load_flags.h. Must be
|
||||
// called before the request is started.
|
||||
void set_load_flags(int load_flags) {
|
||||
core_->load_flags_ = load_flags;
|
||||
}
|
||||
void set_load_flags(int load_flags);
|
||||
|
||||
// Set extra headers on the request. Must be called before the request
|
||||
// is started.
|
||||
void set_extra_request_headers(const std::string& extra_request_headers) {
|
||||
core_->extra_request_headers_ = extra_request_headers;
|
||||
}
|
||||
void set_extra_request_headers(const std::string& extra_request_headers);
|
||||
|
||||
// Set the URLRequestContext on the request. Must be called before the
|
||||
// request is started.
|
||||
void set_request_context(URLRequestContext* request_context) {
|
||||
core_->request_context_ = request_context;
|
||||
}
|
||||
void set_request_context(URLRequestContext* request_context);
|
||||
|
||||
// Retrieve the response headers from the request. Must only be called after
|
||||
// the OnURLFetchComplete callback has run.
|
||||
net::HttpResponseHeaders* response_headers() const {
|
||||
return core_->response_headers_;
|
||||
}
|
||||
net::HttpResponseHeaders* response_headers() const;
|
||||
|
||||
// Start the request. After this is called, you may not change any other
|
||||
// settings.
|
||||
void Start() { core_->Start(); }
|
||||
void Start();
|
||||
|
||||
// Return the URL that this fetcher is processing.
|
||||
const GURL& url() const {
|
||||
return core_->url_;
|
||||
}
|
||||
|
||||
~URLFetcher();
|
||||
const GURL& url() const;
|
||||
|
||||
private:
|
||||
// This class is the real guts of URLFetcher.
|
||||
@@ -137,84 +129,11 @@ class URLFetcher {
|
||||
// thread (since that class is not currently threadsafe and relies on
|
||||
// underlying Microsoft APIs that we don't know to be threadsafe), while
|
||||
// keeping the delegate callback on the delegate's thread.
|
||||
class Core : public base::RefCountedThreadSafe<URLFetcher::Core>,
|
||||
public URLRequest::Delegate {
|
||||
public:
|
||||
// For POST requests, set |content_type| to the MIME type of the content
|
||||
// and set |content| to the data to upload. |flags| are flags to apply to
|
||||
// the load operation--these should be one or more of the LOAD_* flags
|
||||
// defined in url_request.h.
|
||||
Core(URLFetcher* fetcher,
|
||||
const GURL& original_url,
|
||||
RequestType request_type,
|
||||
URLFetcher::Delegate* d);
|
||||
|
||||
// Starts the load. It's important that this not happen in the constructor
|
||||
// because it causes the IO thread to begin AddRef()ing and Release()ing
|
||||
// us. If our caller hasn't had time to fully construct us and take a
|
||||
// reference, the IO thread could interrupt things, run a task, Release()
|
||||
// us, and destroy us, leaving the caller with an already-destroyed object
|
||||
// when construction finishes.
|
||||
void Start();
|
||||
|
||||
// Stops any in-progress load and ensures no callback will happen. It is
|
||||
// safe to call this multiple times.
|
||||
void Stop();
|
||||
|
||||
// URLRequest::Delegate implementations
|
||||
virtual void OnReceivedRedirect(URLRequest* request,
|
||||
const GURL& new_url) { }
|
||||
virtual void OnResponseStarted(URLRequest* request);
|
||||
virtual void OnReadCompleted(URLRequest* request, int bytes_read);
|
||||
|
||||
private:
|
||||
// Wrapper functions that allow us to ensure actions happen on the right
|
||||
// thread.
|
||||
void StartURLRequest();
|
||||
void CancelURLRequest();
|
||||
void OnCompletedURLRequest(const URLRequestStatus& status);
|
||||
|
||||
URLFetcher* fetcher_; // Corresponding fetcher object
|
||||
GURL original_url_; // The URL we were asked to fetch
|
||||
GURL url_; // The URL we eventually wound up at
|
||||
RequestType request_type_; // What type of request is this?
|
||||
URLFetcher::Delegate* delegate_; // Object to notify on completion
|
||||
MessageLoop* delegate_loop_; // Message loop of the creating thread
|
||||
MessageLoop* io_loop_; // Message loop of the IO thread
|
||||
URLRequest* request_; // The actual request this wraps
|
||||
int load_flags_; // Flags for the load operation
|
||||
int response_code_; // HTTP status code for the request
|
||||
std::string data_; // Results of the request
|
||||
scoped_refptr<net::IOBuffer> buffer_;
|
||||
// Read buffer
|
||||
scoped_refptr<URLRequestContext> request_context_;
|
||||
// Cookie/cache info for the request
|
||||
ResponseCookies cookies_; // Response cookies
|
||||
std::string extra_request_headers_;// Extra headers for the request, if any
|
||||
scoped_refptr<net::HttpResponseHeaders> response_headers_;
|
||||
|
||||
std::string upload_content_; // HTTP POST payload
|
||||
std::string upload_content_type_; // MIME type of POST payload
|
||||
|
||||
// The overload protection entry for this URL. This is used to
|
||||
// incrementally back off how rapidly we'll send requests to a particular
|
||||
// URL, to avoid placing too much demand on the remote resource. We update
|
||||
// this with the status of all requests as they return, and in turn use it
|
||||
// to determine how long to wait before making another request.
|
||||
URLFetcherProtectEntry* protect_entry_;
|
||||
// |num_retries_| indicates how many times we've failed to successfully
|
||||
// fetch this URL. Once this value exceeds the maximum number of retries
|
||||
// specified by the protection manager, we'll give up.
|
||||
int num_retries_;
|
||||
|
||||
friend class URLFetcher;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(Core);
|
||||
};
|
||||
class Core;
|
||||
|
||||
scoped_refptr<Core> core_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(URLFetcher);
|
||||
};
|
||||
|
||||
#endif // CHROME_BROWSER_URL_FETCHER_H__
|
||||
|
||||
#endif // CHROME_BROWSER_URL_FETCHER_H_
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "chrome/browser/net/url_fetcher_protect.h"
|
||||
#include "chrome/common/chrome_plugin_lib.h"
|
||||
#include "net/base/ssl_test_util.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/url_request/url_request_unittest.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "net/base/cookie_monster.h"
|
||||
#include "net/base/io_buffer.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "sandbox/src/sandbox.h"
|
||||
#include "webkit/glue/plugins/plugin_constants_win.h"
|
||||
|
||||
|
||||
@@ -30,11 +30,8 @@
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "chrome/common/notification_service.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "chrome/common/pref_service.h"
|
||||
#include "chrome/common/render_messages.h"
|
||||
#include "chrome/common/resource_bundle.h"
|
||||
#include "grit/locale_settings.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
|
||||
#if defined(OS_POSIX)
|
||||
// TODO(port): get rid of this include. It's used just to provide declarations
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "chrome/common/logging_chrome.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "chrome/common/pref_service.h"
|
||||
#include "net/http/http_transaction_factory.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/url_request/url_request_job.h"
|
||||
#include "net/url_request/url_request_job_tracker.h"
|
||||
|
||||
@@ -5,11 +5,13 @@
|
||||
#include "chrome/browser/renderer_host/buffered_resource_handler.h"
|
||||
|
||||
#include "base/histogram.h"
|
||||
#include "base/string_util.h"
|
||||
#include "net/base/mime_sniffer.h"
|
||||
#include "chrome/browser/renderer_host/download_throttling_resource_handler.h"
|
||||
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
|
||||
#include "net/base/mime_sniffer.h"
|
||||
#include "net/base/io_buffer.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "chrome/browser/renderer_host/resource_handler.h"
|
||||
|
||||
class ResourceDispatcherHost;
|
||||
class URLRequest;
|
||||
|
||||
// Used to buffer a request until enough data has been received.
|
||||
class BufferedResourceHandler : public ResourceHandler {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
class DownloadResourceHandler;
|
||||
class ResourceDispatcherHost;
|
||||
class URLRequest;
|
||||
|
||||
// DownloadThrottlingResourceHandler is used to determine if a download should
|
||||
// be allowed. When a DownloadThrottlingResourceHandler is created it pauses the
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
#ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_
|
||||
#define CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include <set>
|
||||
|
||||
#include "base/id_map.h"
|
||||
#include "base/process.h"
|
||||
#include "base/scoped_ptr.h"
|
||||
|
||||
@@ -10,16 +10,13 @@
|
||||
#include <atlcrack.h>
|
||||
#include <atlmisc.h>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/gfx/size.h"
|
||||
#include "base/scoped_handle.h"
|
||||
#include "base/shared_memory.h"
|
||||
#include "base/task.h"
|
||||
#include "chrome/browser/ime_input.h"
|
||||
#include "chrome/browser/renderer_host/render_widget_host_view.h"
|
||||
#include "webkit/glue/webcursor.h"
|
||||
|
||||
namespace gfx {
|
||||
class Size;
|
||||
class Rect;
|
||||
}
|
||||
namespace IPC {
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
// See http://dev.chromium.org/developers/design-documents/multi-process-resource-loading
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/message_loop.h"
|
||||
#include "base/scoped_ptr.h"
|
||||
#include "base/time.h"
|
||||
|
||||
@@ -13,13 +13,9 @@
|
||||
#define CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/observer_list.h"
|
||||
#include "base/process.h"
|
||||
#include "base/ref_counted.h"
|
||||
#include "base/timer.h"
|
||||
#include "chrome/browser/renderer_host/resource_handler.h"
|
||||
#include "chrome/common/filter_policy.h"
|
||||
|
||||
@@ -12,13 +12,14 @@
|
||||
#ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_
|
||||
#define CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/ref_counted.h"
|
||||
#include "chrome/common/filter_policy.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "net/url_request/url_request_status.h"
|
||||
#include "webkit/glue/resource_loader_bridge.h"
|
||||
|
||||
namespace net {
|
||||
class IOBuffer;
|
||||
}
|
||||
|
||||
// Parameters for a resource response header.
|
||||
struct ResourceResponseHead
|
||||
: webkit_glue::ResourceLoaderBridge::ResponseInfo {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "chrome/common/render_messages.h"
|
||||
#include "net/base/cookie_monster.h"
|
||||
#include "net/base/mime_util.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "webkit/glue/webkit_glue.h"
|
||||
#include "webkit/glue/webplugin.h"
|
||||
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "net/url_request/url_request_status.h"
|
||||
|
||||
class URLRequest;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// TODO(port): Move header to the above section when CertStore has been ported.
|
||||
#include "chrome/browser/cert_store.h"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "chrome/browser/download/save_file_manager.h"
|
||||
#endif
|
||||
|
||||
#include "base/string_util.h"
|
||||
#include "net/base/io_buffer.h"
|
||||
|
||||
SaveFileResourceHandler::SaveFileResourceHandler(int render_process_host_id,
|
||||
@@ -89,3 +90,8 @@ bool SaveFileResourceHandler::OnResponseCompleted(
|
||||
read_buffer_ = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
void SaveFileResourceHandler::set_content_length(
|
||||
const std::string& content_length) {
|
||||
content_length_ = StringToInt64(content_length);
|
||||
}
|
||||
|
||||
@@ -39,9 +39,7 @@ class SaveFileResourceHandler : public ResourceHandler {
|
||||
// If the content-length header is not present (or contains something other
|
||||
// than numbers), StringToInt64 returns 0, which indicates 'unknown size' and
|
||||
// is handled correctly by the SaveManager.
|
||||
void set_content_length(const std::string& content_length) {
|
||||
content_length_ = StringToInt64(content_length);
|
||||
}
|
||||
void set_content_length(const std::string& content_length);
|
||||
|
||||
void set_content_disposition(const std::string& content_disposition) {
|
||||
content_disposition_ = content_disposition;
|
||||
@@ -62,4 +60,5 @@ class SaveFileResourceHandler : public ResourceHandler {
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SaveFileResourceHandler);
|
||||
};
|
||||
|
||||
#endif // CHROME_BROWSER_RENDERER_HOST_SAVE_FILE_RESOURCE_HANDLER_H_
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
// The SafeBrowsingProtocolParser class to do the actual parsing.
|
||||
|
||||
#include <deque>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/hash_tables.h"
|
||||
#include "base/scoped_ptr.h"
|
||||
@@ -22,12 +20,12 @@
|
||||
#include "chrome/browser/safe_browsing/protocol_parser.h"
|
||||
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
|
||||
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "testing/gtest/include/gtest/gtest_prod.h"
|
||||
|
||||
class MessageLoop;
|
||||
class Task;
|
||||
class Timer;
|
||||
class URLRequestStatus;
|
||||
|
||||
#if defined(COMPILER_GCC)
|
||||
// Allows us to use URLFetchers in a hash_map with gcc (MSVC is okay without
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <deque>
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include "base/file_path.h"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "chrome/browser/search_engines/template_url_fetcher.h"
|
||||
|
||||
#include "chrome/browser/net/url_fetcher.h"
|
||||
#include "chrome/browser/profile.h"
|
||||
#include "chrome/browser/search_engines/template_url.h"
|
||||
#include "chrome/browser/search_engines/template_url_model.h"
|
||||
@@ -11,6 +12,56 @@
|
||||
#include "chrome/browser/views/edit_keyword_controller.h"
|
||||
|
||||
// RequestDelegate ------------------------------------------------------------
|
||||
class TemplateURLFetcher::RequestDelegate : public URLFetcher::Delegate {
|
||||
public:
|
||||
RequestDelegate(TemplateURLFetcher* fetcher,
|
||||
const std::wstring& keyword,
|
||||
const GURL& osdd_url,
|
||||
const GURL& favicon_url,
|
||||
gfx::NativeView parent_window,
|
||||
bool autodetected)
|
||||
#pragma warning(disable:4355)
|
||||
: url_fetcher_(osdd_url, URLFetcher::GET, this),
|
||||
fetcher_(fetcher),
|
||||
keyword_(keyword),
|
||||
osdd_url_(osdd_url),
|
||||
favicon_url_(favicon_url),
|
||||
parent_window_(parent_window),
|
||||
autodetected_(autodetected) {
|
||||
url_fetcher_.set_request_context(fetcher->profile()->GetRequestContext());
|
||||
url_fetcher_.Start();
|
||||
}
|
||||
|
||||
// If data contains a valid OSDD, a TemplateURL is created and added to
|
||||
// the TemplateURLModel.
|
||||
virtual void OnURLFetchComplete(const URLFetcher* source,
|
||||
const GURL& url,
|
||||
const URLRequestStatus& status,
|
||||
int response_code,
|
||||
const ResponseCookies& cookies,
|
||||
const std::string& data);
|
||||
|
||||
// URL of the OSDD.
|
||||
const GURL& url() const { return osdd_url_; }
|
||||
|
||||
// Keyword to use.
|
||||
const std::wstring keyword() const { return keyword_; }
|
||||
|
||||
private:
|
||||
URLFetcher url_fetcher_;
|
||||
TemplateURLFetcher* fetcher_;
|
||||
const std::wstring keyword_;
|
||||
const GURL osdd_url_;
|
||||
const GURL favicon_url_;
|
||||
bool autodetected_;
|
||||
|
||||
// Used to determine where to place a confirmation dialog. May be NULL,
|
||||
// in which case the confirmation will be centered in the screen if needed.
|
||||
gfx::NativeView parent_window_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RequestDelegate);
|
||||
};
|
||||
|
||||
|
||||
void TemplateURLFetcher::RequestDelegate::OnURLFetchComplete(
|
||||
const URLFetcher* source,
|
||||
@@ -89,6 +140,9 @@ TemplateURLFetcher::TemplateURLFetcher(Profile* profile) : profile_(profile) {
|
||||
DCHECK(profile_);
|
||||
}
|
||||
|
||||
TemplateURLFetcher::~TemplateURLFetcher() {
|
||||
}
|
||||
|
||||
void TemplateURLFetcher::ScheduleDownload(const std::wstring& keyword,
|
||||
const GURL& osdd_url,
|
||||
const GURL& favicon_url,
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
#define CHROME_BROWSER_TEMPLATE_URL_FETCHER_H_
|
||||
|
||||
#include "base/gfx/native_widget_types.h"
|
||||
#include "chrome/browser/net/url_fetcher.h"
|
||||
#include "chrome/browser/profile.h"
|
||||
#include "chrome/common/scoped_vector.h"
|
||||
|
||||
class GURL;
|
||||
@@ -23,6 +21,7 @@ class TemplateURLFetcher {
|
||||
public:
|
||||
// Creates a TemplateURLFetcher with the specified Profile.
|
||||
explicit TemplateURLFetcher(Profile* profile);
|
||||
~TemplateURLFetcher();
|
||||
|
||||
// If TemplateURLFetcher is not already downloading the OSDD for osdd_url,
|
||||
// it is downloaded. If successful and the result can be parsed, a TemplateURL
|
||||
@@ -38,55 +37,7 @@ class TemplateURLFetcher {
|
||||
|
||||
// A RequestDelegate is created to download each OSDD. When done downloading
|
||||
// RequestCompleted is invoked back on the TemplateURLFetcher.
|
||||
class RequestDelegate : public URLFetcher::Delegate {
|
||||
public:
|
||||
RequestDelegate(TemplateURLFetcher* fetcher,
|
||||
const std::wstring& keyword,
|
||||
const GURL& osdd_url,
|
||||
const GURL& favicon_url,
|
||||
gfx::NativeView parent_window,
|
||||
bool autodetected)
|
||||
#pragma warning(disable:4355)
|
||||
: url_fetcher_(osdd_url, URLFetcher::GET, this),
|
||||
fetcher_(fetcher),
|
||||
keyword_(keyword),
|
||||
osdd_url_(osdd_url),
|
||||
favicon_url_(favicon_url),
|
||||
parent_window_(parent_window),
|
||||
autodetected_(autodetected) {
|
||||
url_fetcher_.set_request_context(fetcher->profile()->GetRequestContext());
|
||||
url_fetcher_.Start();
|
||||
}
|
||||
|
||||
// If data contains a valid OSDD, a TemplateURL is created and added to
|
||||
// the TemplateURLModel.
|
||||
virtual void OnURLFetchComplete(const URLFetcher* source,
|
||||
const GURL& url,
|
||||
const URLRequestStatus& status,
|
||||
int response_code,
|
||||
const ResponseCookies& cookies,
|
||||
const std::string& data);
|
||||
|
||||
// URL of the OSDD.
|
||||
const GURL& url() const { return osdd_url_; }
|
||||
|
||||
// Keyword to use.
|
||||
const std::wstring keyword() const { return keyword_; }
|
||||
|
||||
private:
|
||||
URLFetcher url_fetcher_;
|
||||
TemplateURLFetcher* fetcher_;
|
||||
const std::wstring keyword_;
|
||||
const GURL osdd_url_;
|
||||
const GURL favicon_url_;
|
||||
bool autodetected_;
|
||||
|
||||
// Used to determine where to place a confirmation dialog. May be NULL,
|
||||
// in which case the confirmation will be centered in the screen if needed.
|
||||
gfx::NativeView parent_window_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RequestDelegate);
|
||||
};
|
||||
class RequestDelegate;
|
||||
|
||||
Profile* profile() const { return profile_; }
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "base/string_util.h"
|
||||
#include "grit/theme_resources.h"
|
||||
#include "chrome/browser/profile.h"
|
||||
#include "chrome/browser/tab_contents/tab_contents.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "base/string_util.h"
|
||||
#include "base/base_drag_source.h"
|
||||
#include "grit/theme_resources.h"
|
||||
#include "chrome/browser/bookmarks/bookmark_context_menu.h"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef CHROME_BROWSER_VIEWS_BUGREPORT_VIEW_H__
|
||||
#define CHROME_BROWSER_VIEWS_BUGREPORT_VIEW_H__
|
||||
#ifndef CHROME_BROWSER_VIEWS_BUGREPORT_VIEW_H_
|
||||
#define CHROME_BROWSER_VIEWS_BUGREPORT_VIEW_H_
|
||||
|
||||
#include "chrome/browser/net/url_fetcher.h"
|
||||
#include "chrome/views/combo_box.h"
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "chrome/views/native_button.h"
|
||||
#include "chrome/views/text_field.h"
|
||||
#include "chrome/views/view.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
|
||||
namespace views {
|
||||
class CheckBox;
|
||||
@@ -123,5 +124,4 @@ class BugReportView : public views::View,
|
||||
DISALLOW_EVIL_CONSTRUCTORS(BugReportView);
|
||||
};
|
||||
|
||||
#endif // CHROME_BROWSER_VIEWS_BUGREPORT_VIEW_H__
|
||||
|
||||
#endif // CHROME_BROWSER_VIEWS_BUGREPORT_VIEW_H_
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "grit/generated_resources.h"
|
||||
#include "grit/locale_settings.h"
|
||||
#include "net/base/ssl_config_service.h"
|
||||
#include "net/base/cookie_policy.h"
|
||||
|
||||
using views::GridLayout;
|
||||
using views::ColumnSet;
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
#include "chrome/browser/shell_dialogs.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <Commdlg.h>
|
||||
#include <commdlg.h>
|
||||
#include <shlobj.h>
|
||||
#include <atlbase.h>
|
||||
//#include <atlbase.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
#include "base/file_util.h"
|
||||
#include "base/registry.h"
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/process.h"
|
||||
|
||||
// Holds information about a child process.
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "chrome/common/chrome_plugin_lib.h"
|
||||
#include "chrome/test/chrome_plugin/test_chrome_plugin.h"
|
||||
#include "net/base/io_buffer.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/url_request/url_request_test_job.h"
|
||||
#include "net/url_request/url_request_unittest.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
class ChromePluginLib;
|
||||
class MessageLoop;
|
||||
namespace net{
|
||||
namespace net {
|
||||
class HttpResponseHeaders;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
#include "chrome/common/chrome_plugin_lib.h"
|
||||
#include "chrome/common/notification_service.h"
|
||||
#include "net/base/net_errors.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
|
||||
using base::Time;
|
||||
using base::TimeDelta;
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H__
|
||||
#define CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H__
|
||||
#ifndef CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H_
|
||||
#define CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "net/url_request/url_request_job.h"
|
||||
#include "chrome/browser/chrome_plugin_host.h"
|
||||
#include "chrome/common/chrome_plugin_api.h"
|
||||
@@ -14,6 +12,7 @@
|
||||
#include "chrome/common/notification_observer.h"
|
||||
|
||||
class ChromePluginLib;
|
||||
class URLRequest;
|
||||
|
||||
// A request job that handles network requests intercepted by a Chrome plugin.
|
||||
class URLRequestInterceptJob
|
||||
@@ -56,9 +55,7 @@ class URLRequestInterceptJob
|
||||
net::IOBuffer* read_buffer_;
|
||||
int read_buffer_size_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(URLRequestInterceptJob);
|
||||
DISALLOW_COPY_AND_ASSIGN(URLRequestInterceptJob);
|
||||
};
|
||||
|
||||
|
||||
#endif // CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H__
|
||||
|
||||
#endif // CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H_
|
||||
|
||||
@@ -15,9 +15,8 @@
|
||||
#ifndef CHROME_COMMON_PREF_SERVICE_H_
|
||||
#define CHROME_COMMON_PREF_SERVICE_H_
|
||||
|
||||
#include <string>
|
||||
#include <set>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/hash_tables.h"
|
||||
#include "base/non_thread_safe.h"
|
||||
#include "base/observer_list.h"
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "media/audio/audio_output.h"
|
||||
#include "net/base/upload_data.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/url_request/url_request_status.h"
|
||||
#include "webkit/glue/autofill_form.h"
|
||||
#include "webkit/glue/cache_manager.h"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "chrome/plugin/webplugin_proxy.h"
|
||||
#include "net/base/data_url.h"
|
||||
#include "net/base/upload_data.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "webkit/glue/plugins/plugin_instance.h"
|
||||
#include "webkit/glue/resource_loader_bridge.h"
|
||||
#include "webkit/glue/resource_type.h"
|
||||
|
||||
@@ -204,6 +204,14 @@
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tools\build\win\precompiled.h"
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#ifndef MEDIA_BASE_BUFFERS_H_
|
||||
#define MEDIA_BASE_BUFFERS_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/ref_counted.h"
|
||||
#include "base/time.h"
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "net/base/client_socket.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "net/base/net_errors.h"
|
||||
|
||||
namespace net {
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
// Identical to posix system call getpeername().
|
||||
// Needed by ssl_client_socket_nss.
|
||||
int ClientSocket::GetPeerName(struct sockaddr *name, socklen_t *namelen) {
|
||||
// Default implementation just permits some unit tests to link.
|
||||
NOTREACHED();
|
||||
return ERR_UNEXPECTED;
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace net
|
||||
@@ -5,9 +5,13 @@
|
||||
#ifndef NET_BASE_CLIENT_SOCKET_H_
|
||||
#define NET_BASE_CLIENT_SOCKET_H_
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#include "net/base/socket.h"
|
||||
#include "net/base/net_errors.h"
|
||||
|
||||
namespace net {
|
||||
|
||||
@@ -46,11 +50,7 @@ class ClientSocket : public Socket {
|
||||
#if defined(OS_LINUX)
|
||||
// Identical to posix system call getpeername().
|
||||
// Needed by ssl_client_socket_nss.
|
||||
virtual int GetPeerName(struct sockaddr *name, socklen_t *namelen) {
|
||||
// Default implementation just permits some unit tests to link.
|
||||
NOTREACHED();
|
||||
return ERR_UNEXPECTED;
|
||||
}
|
||||
virtual int GetPeerName(struct sockaddr *name, socklen_t *namelen);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "net/base/io_buffer.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
|
||||
namespace net {
|
||||
|
||||
IOBuffer::IOBuffer(int buffer_size) {
|
||||
DCHECK(buffer_size);
|
||||
data_ = new char[buffer_size];
|
||||
}
|
||||
|
||||
} // namespace net
|
||||
@@ -5,7 +5,6 @@
|
||||
#ifndef NET_BASE_IO_BUFFER_H_
|
||||
#define NET_BASE_IO_BUFFER_H_
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/ref_counted.h"
|
||||
|
||||
namespace net {
|
||||
@@ -15,10 +14,7 @@ namespace net {
|
||||
class IOBuffer : public base::RefCountedThreadSafe<IOBuffer> {
|
||||
public:
|
||||
IOBuffer() : data_(NULL) {}
|
||||
explicit IOBuffer(int buffer_size) {
|
||||
DCHECK(buffer_size);
|
||||
data_ = new char[buffer_size];
|
||||
}
|
||||
explicit IOBuffer(int buffer_size);
|
||||
explicit IOBuffer(char* data) : data_(data) {}
|
||||
virtual ~IOBuffer() {
|
||||
delete[] data_;
|
||||
|
||||
@@ -2,13 +2,12 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef NET_BASE_UPLOAD_DATA_H__
|
||||
#define NET_BASE_UPLOAD_DATA_H__
|
||||
#ifndef NET_BASE_UPLOAD_DATA_H_
|
||||
#define NET_BASE_UPLOAD_DATA_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/ref_counted.h"
|
||||
|
||||
namespace net {
|
||||
@@ -98,5 +97,4 @@ class UploadData : public base::RefCounted<UploadData> {
|
||||
|
||||
} // namespace net
|
||||
|
||||
#endif // NET_BASE_UPLOAD_DATA_H__
|
||||
|
||||
#endif // NET_BASE_UPLOAD_DATA_H_
|
||||
|
||||
+17
-1
@@ -14,7 +14,7 @@
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
<ToolFile
|
||||
RelativePath="convert_tld_data.rules"
|
||||
RelativePath=".\convert_tld_data.rules"
|
||||
/>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
@@ -184,6 +184,10 @@
|
||||
RelativePath="..\base\cert_verify_result.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\base\client_socket.cc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\base\client_socket.h"
|
||||
>
|
||||
@@ -324,6 +328,10 @@
|
||||
RelativePath="..\base\host_resolver.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\base\io_buffer.cc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\base\io_buffer.h"
|
||||
>
|
||||
@@ -788,6 +796,10 @@
|
||||
RelativePath="..\http\http_response_headers.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\http\http_response_info.cc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\http\http_response_info.h"
|
||||
>
|
||||
@@ -820,6 +832,10 @@
|
||||
<Filter
|
||||
Name="disk_cache"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\disk_cache\addr.cc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\disk_cache\addr.h"
|
||||
>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "net/disk_cache/addr.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
|
||||
namespace disk_cache {
|
||||
|
||||
int Addr::start_block() const {
|
||||
DCHECK(is_block_file());
|
||||
return value_ & kStartBlockMask;
|
||||
}
|
||||
|
||||
int Addr::num_blocks() const {
|
||||
DCHECK(is_block_file() || !value_);
|
||||
return ((value_ & kNumBlocksMask) >> kNumBlocksOffset) + 1;
|
||||
}
|
||||
|
||||
bool Addr::SetFileNumber(int file_number) {
|
||||
DCHECK(is_separate_file());
|
||||
if (file_number & ~kFileNameMask)
|
||||
return false;
|
||||
value_ = kInitializedMask | file_number;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace disk_cache
|
||||
+6
-24
@@ -5,11 +5,9 @@
|
||||
// This is an internal class that handles the address of a cache record.
|
||||
// See net/disk_cache/disk_cache.h for the public interface of the cache.
|
||||
|
||||
#ifndef NET_DISK_CACHE_ADDR_H__
|
||||
#define NET_DISK_CACHE_ADDR_H__
|
||||
#ifndef NET_DISK_CACHE_ADDR_H_
|
||||
#define NET_DISK_CACHE_ADDR_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/logging.h"
|
||||
#include "net/disk_cache/disk_format.h"
|
||||
|
||||
namespace disk_cache {
|
||||
@@ -87,24 +85,9 @@ class Addr {
|
||||
return ((value_ & kFileSelectorMask) >> kFileSelectorOffset);
|
||||
}
|
||||
|
||||
int start_block() const {
|
||||
DCHECK(is_block_file());
|
||||
return value_ & kStartBlockMask;
|
||||
}
|
||||
|
||||
int num_blocks() const {
|
||||
DCHECK(is_block_file() || !value_);
|
||||
return ((value_ & kNumBlocksMask) >> kNumBlocksOffset) + 1;
|
||||
}
|
||||
|
||||
bool SetFileNumber(int file_number) {
|
||||
DCHECK(is_separate_file());
|
||||
if (file_number & ~kFileNameMask)
|
||||
return false;
|
||||
value_ = kInitializedMask | file_number;
|
||||
return true;
|
||||
}
|
||||
|
||||
int start_block() const;
|
||||
int num_blocks() const;
|
||||
bool SetFileNumber(int file_number);
|
||||
int BlockSize() const {
|
||||
return BlockSizeForFileType(file_type());
|
||||
}
|
||||
@@ -151,5 +134,4 @@ class Addr {
|
||||
|
||||
} // namespace disk_cache
|
||||
|
||||
#endif // NET_DISK_CACHE_ADDR_H__
|
||||
|
||||
#endif // NET_DISK_CACHE_ADDR_H_
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <list>
|
||||
|
||||
#include "base/scoped_ptr.h"
|
||||
#include "net/disk_cache/addr.h"
|
||||
#include "net/disk_cache/mapped_file.h"
|
||||
#include "net/disk_cache/storage_block.h"
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef NET_DISK_CACHE_CACHE_INTERNAL_INL_H__
|
||||
#define NET_DISK_CACHE_CACHE_INTERNAL_INL_H__
|
||||
#ifndef NET_DISK_CACHE_CACHE_INTERNAL_INL_H_
|
||||
#define NET_DISK_CACHE_CACHE_INTERNAL_INL_H_
|
||||
|
||||
#include "net/disk_cache/storage_block.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "net/disk_cache/trace.h"
|
||||
|
||||
namespace disk_cache {
|
||||
@@ -132,5 +133,4 @@ template<typename T> void StorageBlock<T>::DeleteData() {
|
||||
|
||||
} // namespace disk_cache
|
||||
|
||||
#endif // NET_DISK_CACHE_CACHE_INTERNAL_INL_H__
|
||||
|
||||
#endif // NET_DISK_CACHE_CACHE_INTERNAL_INL_H_
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "net/disk_cache/disk_cache.h"
|
||||
#include "net/http/http_network_layer.h"
|
||||
#include "net/http/http_request_info.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/http/http_response_info.h"
|
||||
#include "net/http/http_transaction.h"
|
||||
#include "net/http/http_util.h"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#define NET_HTTP_HTTP_CACHE_H_
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <set>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/hash_tables.h"
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "net/http/http_chunked_decoder.h"
|
||||
#include "net/http/http_network_session.h"
|
||||
#include "net/http/http_request_info.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/http/http_util.h"
|
||||
|
||||
using base::Time;
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "net/http/http_response_info.h"
|
||||
|
||||
#include "net/http/http_response_headers.h"
|
||||
|
||||
namespace net {
|
||||
|
||||
HttpResponseInfo::HttpResponseInfo() {
|
||||
}
|
||||
|
||||
HttpResponseInfo::~HttpResponseInfo() {
|
||||
}
|
||||
|
||||
} // namespace net
|
||||
@@ -2,19 +2,23 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef NET_HTTP_HTTP_RESPONSE_INFO_H__
|
||||
#define NET_HTTP_HTTP_RESPONSE_INFO_H__
|
||||
#ifndef NET_HTTP_HTTP_RESPONSE_INFO_H_
|
||||
#define NET_HTTP_HTTP_RESPONSE_INFO_H_
|
||||
|
||||
#include "base/time.h"
|
||||
#include "net/base/auth.h"
|
||||
#include "net/base/ssl_info.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/http/http_vary_data.h"
|
||||
|
||||
namespace net {
|
||||
|
||||
class HttpResponseHeaders;
|
||||
|
||||
class HttpResponseInfo {
|
||||
public:
|
||||
HttpResponseInfo();
|
||||
~HttpResponseInfo();
|
||||
|
||||
// The following is only defined if the request_time memmber is set.
|
||||
// If this response was resurrected from cache, then this bool is set, and
|
||||
// request_time may corresponds to a time "far" in the past. Note that
|
||||
@@ -48,5 +52,4 @@ class HttpResponseInfo {
|
||||
|
||||
} // namespace net
|
||||
|
||||
#endif // NET_HTTP_HTTP_RESPONSE_INFO_H__
|
||||
|
||||
#endif // NET_HTTP_HTTP_RESPONSE_INFO_H_
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "net/disk_cache/disk_cache.h"
|
||||
#include "net/http/http_cache.h"
|
||||
#include "net/http/http_request_info.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/http/http_response_info.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
04C626D80E8DE3AA0067E92A /* http_auth_handler_basic_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 04C626D70E8DE3AA0067E92A /* http_auth_handler_basic_unittest.cc */; };
|
||||
04C626DA0E8DE3BA0067E92A /* http_auth_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 04C626D90E8DE3BA0067E92A /* http_auth_unittest.cc */; };
|
||||
04E7BD550EC4ECF60078FE58 /* http_auth_cache.cc in Sources */ = {isa = PBXBuildFile; fileRef = 04E7BD540EC4ECF60078FE58 /* http_auth_cache.cc */; };
|
||||
3853286C2A6C0BE6E1113FA2 /* client_socket.cc in Sources */ = {isa = PBXBuildFile; fileRef = 2C481A2E21097E841607B968 /* client_socket.cc */; };
|
||||
4D4C5BE20EF1B89E002CA805 /* directory_lister_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED325A0E5A181C00A747DB /* directory_lister_unittest.cc */; };
|
||||
4D4C5C060EF1B8C5002CA805 /* filter_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D4C5C050EF1B8C5002CA805 /* filter_unittest.cc */; };
|
||||
4D4C5C070EF1B915002CA805 /* http_cache_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED33550E5A194700A747DB /* http_cache_unittest.cc */; };
|
||||
@@ -134,6 +135,7 @@
|
||||
7BED34190E5A1A8600A747DB /* libnet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4BA04540E25613300BE02C6 /* libnet.a */; };
|
||||
7BED34450E5A1A9600A747DB /* libbase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7BED324A0E5A17C000A747DB /* libbase.a */; };
|
||||
7BED34520E5A1ABC00A747DB /* libgtest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7BED32530E5A17C300A747DB /* libgtest.a */; };
|
||||
81C766A4F7089E3ED5BD33A4 /* addr.cc in Sources */ = {isa = PBXBuildFile; fileRef = D7745B2B51F48114C05EB14A /* addr.cc */; };
|
||||
8200F2030E5F741E005A3C44 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8200F2020E5F741E005A3C44 /* CoreServices.framework */; };
|
||||
820701040EB6611F005CD9E7 /* proxy_resolver_mac.cc in Sources */ = {isa = PBXBuildFile; fileRef = 820701020EB6611F005CD9E7 /* proxy_resolver_mac.cc */; };
|
||||
820706940EB8D9D4005CD9E7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 820706930EB8D9D4005CD9E7 /* SystemConfiguration.framework */; };
|
||||
@@ -159,6 +161,7 @@
|
||||
827E139D0E81611D00183614 /* x509_certificate_mac.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED32800E5A181C00A747DB /* x509_certificate_mac.cc */; };
|
||||
82ECB3090E5B651D00A913E3 /* mime_sniffer.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED32AD0E5A181C00A747DB /* mime_sniffer.cc */; };
|
||||
93D11DCE0E91463000C36437 /* file_stream_posix.cc in Sources */ = {isa = PBXBuildFile; fileRef = 93D11DCD0E91463000C36437 /* file_stream_posix.cc */; };
|
||||
A2420E59B0E92F1C5DF8FE67 /* io_buffer.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67E592A64772BE82718FD4C /* io_buffer.cc */; };
|
||||
A50055BF0EBF7CB2007B0A90 /* telnet_server_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED328B0E5A181C00A747DB /* telnet_server_unittest.cc */; };
|
||||
A50055C00EBF7CD6007B0A90 /* listen_socket_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED32B10E5A181C00A747DB /* listen_socket_unittest.cc */; };
|
||||
A50055FE0EBF800D007B0A90 /* telnet_server.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED328D0E5A181C00A747DB /* telnet_server.cc */; };
|
||||
@@ -186,6 +189,7 @@
|
||||
E4CE9C260E8C027900D5378C /* http_network_layer_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED335C0E5A194700A747DB /* http_network_layer_unittest.cc */; };
|
||||
E4CE9C2E0E8C02ED00D5378C /* http_transaction_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED334A0E5A194700A747DB /* http_transaction_unittest.cc */; };
|
||||
E4CE9C380E8C035C00D5378C /* http_network_transaction_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED33590E5A194700A747DB /* http_network_transaction_unittest.cc */; };
|
||||
E51639B07E0FC884891C5135 /* http_response_info.cc in Sources */ = {isa = PBXBuildFile; fileRef = AD46F9C0118A7D723526A361 /* http_response_info.cc */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@@ -442,6 +446,7 @@
|
||||
04E7BD560EC4ED020078FE58 /* http_auth_cache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = http_auth_cache.h; sourceTree = "<group>"; };
|
||||
0E81748E2B2E8B814DBB78EC /* ftp_auth_cache.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ftp_auth_cache.cc; path = ftp/ftp_auth_cache.cc; sourceTree = SOURCE_ROOT; };
|
||||
15C6370BF6FE62308A559648 /* ftp_auth_cache_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ftp_auth_cache_unittest.cc; path = ftp/ftp_auth_cache_unittest.cc; sourceTree = SOURCE_ROOT; };
|
||||
2C481A2E21097E841607B968 /* client_socket.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = client_socket.cc; sourceTree = "<group>"; };
|
||||
4D4C5C050EF1B8C5002CA805 /* filter_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = filter_unittest.cc; sourceTree = "<group>"; };
|
||||
533102E60E5E3EBF00FF8E32 /* net_util_posix.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = net_util_posix.cc; sourceTree = "<group>"; };
|
||||
58586B4C2F020D851B930BF2 /* cert_verify_result.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cert_verify_result.h; sourceTree = "<group>"; };
|
||||
@@ -689,9 +694,12 @@
|
||||
93D11DCD0E91463000C36437 /* file_stream_posix.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = file_stream_posix.cc; sourceTree = "<group>"; };
|
||||
A5AB7BFB0EB7DBA10070A7D3 /* file_stream_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = file_stream_unittest.cc; sourceTree = "<group>"; };
|
||||
ACAB6D5C0F43A727D039E138 /* ftp_auth_cache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ftp_auth_cache.h; path = ftp/ftp_auth_cache.h; sourceTree = SOURCE_ROOT; };
|
||||
AD46F9C0118A7D723526A361 /* http_response_info.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = http_response_info.cc; sourceTree = "<group>"; };
|
||||
B87DD6154A7A9ED60F28F016 /* cert_verifier.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cert_verifier.cc; sourceTree = "<group>"; };
|
||||
C081BA94B2F59669BFAFD808 /* cert_status_flags.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cert_status_flags.cc; sourceTree = "<group>"; };
|
||||
D4726BC70CCE10F4FF2A5E12 /* connection_type_histograms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = connection_type_histograms.h; sourceTree = "<group>"; };
|
||||
D67E592A64772BE82718FD4C /* io_buffer.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = io_buffer.cc; sourceTree = "<group>"; };
|
||||
D7745B2B51F48114C05EB14A /* addr.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = addr.cc; sourceTree = "<group>"; };
|
||||
DD0B3349460AB0703FCE0C7A /* cert_verifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cert_verifier.h; sourceTree = "<group>"; };
|
||||
DFC96EF80EF9BC5D003C335B /* eviction.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = eviction.cc; sourceTree = "<group>"; };
|
||||
DFC96EF90EF9BC5D003C335B /* eviction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = eviction.h; sourceTree = "<group>"; };
|
||||
@@ -904,6 +912,7 @@
|
||||
B87DD6154A7A9ED60F28F016 /* cert_verifier.cc */,
|
||||
DD0B3349460AB0703FCE0C7A /* cert_verifier.h */,
|
||||
58586B4C2F020D851B930BF2 /* cert_verify_result.h */,
|
||||
2C481A2E21097E841607B968 /* client_socket.cc */,
|
||||
7BED32710E5A181C00A747DB /* client_socket.h */,
|
||||
7BED32700E5A181C00A747DB /* client_socket_factory.cc */,
|
||||
7BED326F0E5A181C00A747DB /* client_socket_factory.h */,
|
||||
@@ -950,6 +959,7 @@
|
||||
7BED32B40E5A181C00A747DB /* host_resolver.h */,
|
||||
7B82FF450E763620008F45CF /* host_resolver_unittest.cc */,
|
||||
7BA3615D0E8C35A50023C8B9 /* host_resolver_unittest.h */,
|
||||
D67E592A64772BE82718FD4C /* io_buffer.cc */,
|
||||
7BED32B30E5A181C00A747DB /* listen_socket.cc */,
|
||||
7BED32B20E5A181C00A747DB /* listen_socket.h */,
|
||||
7BED32B10E5A181C00A747DB /* listen_socket_unittest.cc */,
|
||||
@@ -1017,6 +1027,7 @@
|
||||
7BED32D30E5A18E800A747DB /* disk_cache */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D7745B2B51F48114C05EB14A /* addr.cc */,
|
||||
7BED32F50E5A190600A747DB /* addr.h */,
|
||||
7BED32EE0E5A190600A747DB /* addr_unittest.cc */,
|
||||
7BED32EB0E5A190600A747DB /* backend_impl.cc */,
|
||||
@@ -1107,6 +1118,7 @@
|
||||
7BED33440E5A194700A747DB /* http_response_headers.cc */,
|
||||
7BED334D0E5A194700A747DB /* http_response_headers.h */,
|
||||
7BED33480E5A194700A747DB /* http_response_headers_unittest.cc */,
|
||||
AD46F9C0118A7D723526A361 /* http_response_info.cc */,
|
||||
7BED33450E5A194700A747DB /* http_response_info.h */,
|
||||
7BED33650E5A194700A747DB /* http_transaction.h */,
|
||||
7BED33530E5A194700A747DB /* http_transaction_factory.h */,
|
||||
@@ -1471,6 +1483,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
81C766A4F7089E3ED5BD33A4 /* addr.cc in Sources */,
|
||||
7B8503E90E5B2D4700730B43 /* address_list.cc in Sources */,
|
||||
7B8503EA0E5B2D4F00730B43 /* backend_impl.cc in Sources */,
|
||||
7BA015440E5A1BFA00044150 /* base64.cc in Sources */,
|
||||
@@ -1479,6 +1492,7 @@
|
||||
7B8504050E5B2DBD00730B43 /* cache_util_posix.cc in Sources */,
|
||||
7BCF4CF2ECABD68C18FA59F7 /* cert_status_flags.cc in Sources */,
|
||||
B07E3550EFE4B6C6680D49BE /* cert_verifier.cc in Sources */,
|
||||
3853286C2A6C0BE6E1113FA2 /* client_socket.cc in Sources */,
|
||||
E4CE9C0D0E8BFFFA00D5378C /* client_socket_factory.cc in Sources */,
|
||||
7B8504080E5B2DD800730B43 /* client_socket_handle.cc in Sources */,
|
||||
7B8504090E5B2DD800730B43 /* client_socket_pool.cc in Sources */,
|
||||
@@ -1511,8 +1525,10 @@
|
||||
E49DD3290E893336003C7A87 /* http_network_layer.cc in Sources */,
|
||||
E4CE9BC50E8BF92400D5378C /* http_network_transaction.cc in Sources */,
|
||||
821F21300E5CD746003C7E38 /* http_response_headers.cc in Sources */,
|
||||
E51639B07E0FC884891C5135 /* http_response_info.cc in Sources */,
|
||||
7B85042F0E5B2E4900730B43 /* http_util.cc in Sources */,
|
||||
821F207F0E5CD3C6003C7E38 /* http_vary_data.cc in Sources */,
|
||||
A2420E59B0E92F1C5DF8FE67 /* io_buffer.cc in Sources */,
|
||||
A50055FF0EBF8018007B0A90 /* listen_socket.cc in Sources */,
|
||||
7B8504320E5B2E4900730B43 /* mapped_file_posix.cc in Sources */,
|
||||
7B8504330E5B2E4900730B43 /* mem_backend_impl.cc in Sources */,
|
||||
|
||||
@@ -31,6 +31,7 @@ input_files = ChromeFileList([
|
||||
'base/cert_verifier.cc',
|
||||
'base/cert_verifier.h',
|
||||
'base/cert_verify_result.h',
|
||||
'base/client_socket.cc',
|
||||
'base/client_socket.h',
|
||||
'base/client_socket_factory.cc',
|
||||
'base/client_socket_factory.h',
|
||||
@@ -66,6 +67,7 @@ input_files = ChromeFileList([
|
||||
'base/gzip_header.h',
|
||||
'base/host_resolver.cc',
|
||||
'base/host_resolver.h',
|
||||
'base/io_buffer.cc',
|
||||
'base/io_buffer.h',
|
||||
'base/listen_socket.cc',
|
||||
'base/listen_socket.h',
|
||||
@@ -180,6 +182,7 @@ input_files = ChromeFileList([
|
||||
'http/http_request_info.h',
|
||||
'http/http_response_headers.cc',
|
||||
'http/http_response_headers.h',
|
||||
'http/http_response_info.cc',
|
||||
'http/http_response_info.h',
|
||||
'http/http_transaction.h',
|
||||
'http/http_transaction_factory.h',
|
||||
@@ -189,6 +192,7 @@ input_files = ChromeFileList([
|
||||
'http/http_vary_data.h',
|
||||
]),
|
||||
MSVSFilter('disk_cache', [
|
||||
'disk_cache/addr.cc',
|
||||
'disk_cache/addr.h',
|
||||
'disk_cache/backend_impl.cc',
|
||||
'disk_cache/backend_impl.h',
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "net/url_request/mime_sniffer_proxy.h"
|
||||
|
||||
#include "net/base/io_buffer.h"
|
||||
#include "net/base/mime_sniffer.h"
|
||||
|
||||
static const int kBufferSize = 1024;
|
||||
|
||||
@@ -22,9 +22,12 @@
|
||||
#ifndef NET_URL_REQUEST_MIME_SNIFFER_PROXY_H_
|
||||
#define NET_URL_REQUEST_MIME_SNIFFER_PROXY_H_
|
||||
|
||||
#include "net/base/io_buffer.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
|
||||
namespace net {
|
||||
class IOBuffer;
|
||||
}
|
||||
|
||||
class MimeSnifferProxy : public URLRequest::Delegate {
|
||||
public:
|
||||
// The constructor inserts this MimeSnifferProxy in between the URLRequest
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
|
||||
#include "net/url_request/url_request.h"
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/message_loop.h"
|
||||
#include "base/process_util.h"
|
||||
#include "base/singleton.h"
|
||||
#include "base/stats_counters.h"
|
||||
#include "base/string_util.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "net/base/load_flags.h"
|
||||
#include "net/base/net_errors.h"
|
||||
#include "net/base/upload_data.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/http/http_util.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/url_request/url_request_job.h"
|
||||
#include "net/url_request/url_request_job_manager.h"
|
||||
|
||||
@@ -101,6 +101,19 @@ void URLRequest::AppendFileRangeToUpload(const wstring& file_path,
|
||||
upload_->AppendFileRange(file_path, offset, length);
|
||||
}
|
||||
|
||||
void URLRequest::set_upload(net::UploadData* upload) {
|
||||
upload_ = upload;
|
||||
}
|
||||
|
||||
// Get the upload data directly.
|
||||
net::UploadData* URLRequest::get_upload() {
|
||||
return upload_.get();
|
||||
}
|
||||
|
||||
bool URLRequest::has_upload() const {
|
||||
return upload_ != NULL;
|
||||
}
|
||||
|
||||
void URLRequest::SetExtraRequestHeaderById(int id, const string& value,
|
||||
bool overwrite) {
|
||||
DCHECK(!is_pending_);
|
||||
@@ -171,6 +184,10 @@ void URLRequest::GetAllResponseHeaders(string* headers) {
|
||||
}
|
||||
}
|
||||
|
||||
net::HttpResponseHeaders* URLRequest::response_headers() const {
|
||||
return response_info_.headers.get();
|
||||
}
|
||||
|
||||
bool URLRequest::GetResponseCookies(ResponseCookies* cookies) {
|
||||
DCHECK(job_);
|
||||
return job_->GetResponseCookies(cookies);
|
||||
@@ -206,6 +223,21 @@ bool URLRequest::IsHandledURL(const GURL& url) {
|
||||
return IsHandledProtocol(url.scheme());
|
||||
}
|
||||
|
||||
void URLRequest::set_policy_url(const GURL& policy_url) {
|
||||
DCHECK(!is_pending_);
|
||||
policy_url_ = policy_url;
|
||||
}
|
||||
|
||||
void URLRequest::set_method(const std::string& method) {
|
||||
DCHECK(!is_pending_);
|
||||
method_ = method;
|
||||
}
|
||||
|
||||
void URLRequest::set_referrer(const std::string& referrer) {
|
||||
DCHECK(!is_pending_);
|
||||
referrer_ = referrer;
|
||||
}
|
||||
|
||||
void URLRequest::Start() {
|
||||
DCHECK(!is_pending_);
|
||||
DCHECK(!job_);
|
||||
@@ -377,6 +409,14 @@ int URLRequest::Redirect(const GURL& location, int http_status_code) {
|
||||
return net::OK;
|
||||
}
|
||||
|
||||
URLRequestContext* URLRequest::context() {
|
||||
return context_.get();
|
||||
}
|
||||
|
||||
void URLRequest::set_context(URLRequestContext* context) {
|
||||
context_ = context;
|
||||
}
|
||||
|
||||
int64 URLRequest::GetExpectedContentSize() const {
|
||||
int64 expected_content_size = -1;
|
||||
if (job_)
|
||||
@@ -384,3 +424,12 @@ int64 URLRequest::GetExpectedContentSize() const {
|
||||
|
||||
return expected_content_size;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
||||
URLRequestMetrics::~URLRequestMetrics() {
|
||||
DLOG_IF(WARNING, object_count != 0) <<
|
||||
"Leaking " << object_count << " URLRequest object(s)";
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,22 +8,22 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/ref_counted.h"
|
||||
#include "base/time.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "net/base/load_states.h"
|
||||
#include "net/base/ssl_info.h"
|
||||
#include "net/base/upload_data.h"
|
||||
#include "net/base/x509_certificate.h"
|
||||
#include "net/http/http_response_info.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/url_request/url_request_status.h"
|
||||
|
||||
namespace net {
|
||||
|
||||
class IOBuffer;
|
||||
class UploadData;
|
||||
class X509Certificate;
|
||||
|
||||
}
|
||||
|
||||
class URLRequestContext;
|
||||
class URLRequestJob;
|
||||
|
||||
// This stores the values of the Set-Cookie headers received during the request.
|
||||
@@ -203,29 +203,20 @@ class URLRequest {
|
||||
// The URL that should be consulted for the third-party cookie blocking
|
||||
// policy.
|
||||
const GURL& policy_url() const { return policy_url_; }
|
||||
void set_policy_url(const GURL& policy_url) {
|
||||
DCHECK(!is_pending_);
|
||||
policy_url_ = policy_url;
|
||||
}
|
||||
void set_policy_url(const GURL& policy_url);
|
||||
|
||||
// The request method, as an uppercase string. "GET" is the default value.
|
||||
// The request method may only be changed before Start() is called and
|
||||
// should only be assigned an uppercase value.
|
||||
const std::string& method() const { return method_; }
|
||||
void set_method(const std::string& method) {
|
||||
DCHECK(!is_pending_);
|
||||
method_ = method;
|
||||
}
|
||||
void set_method(const std::string& method);
|
||||
|
||||
// The referrer URL for the request. This header may actually be suppressed
|
||||
// from the underlying network request for security reasons (e.g., a HTTPS
|
||||
// URL will not be sent as the referrer for a HTTP request). The referrer
|
||||
// may only be changed before Start() is called.
|
||||
const std::string& referrer() const { return referrer_; }
|
||||
void set_referrer(const std::string& referrer) {
|
||||
DCHECK(!is_pending_);
|
||||
referrer_ = referrer;
|
||||
}
|
||||
void set_referrer(const std::string& referrer);
|
||||
|
||||
// The delegate of the request. This value may be changed at any time,
|
||||
// and it is permissible for it to be null.
|
||||
@@ -250,13 +241,13 @@ class URLRequest {
|
||||
}
|
||||
|
||||
// Set the upload data directly.
|
||||
void set_upload(net::UploadData* upload) { upload_ = upload; }
|
||||
void set_upload(net::UploadData* upload);
|
||||
|
||||
// Get the upload data directly.
|
||||
net::UploadData* get_upload() { return upload_.get(); }
|
||||
net::UploadData* get_upload();
|
||||
|
||||
// Returns true if the request has a non-empty message body to upload.
|
||||
bool has_upload() const { return upload_ != NULL; }
|
||||
bool has_upload() const;
|
||||
|
||||
// Set an extra request header by ID or name. These methods may only be
|
||||
// called before Start() is called. It is an error to call it later.
|
||||
@@ -309,9 +300,7 @@ class URLRequest {
|
||||
|
||||
// Get all response headers, as a HttpResponseHeaders object. See comments
|
||||
// in HttpResponseHeaders class as to the format of the data.
|
||||
net::HttpResponseHeaders* response_headers() const {
|
||||
return response_info_.headers.get();
|
||||
}
|
||||
net::HttpResponseHeaders* response_headers() const;
|
||||
|
||||
// Get the SSL connection info.
|
||||
const net::SSLInfo& ssl_info() const {
|
||||
@@ -421,8 +410,8 @@ class URLRequest {
|
||||
void set_enable_profiling(bool profiling) { enable_profiling_ = profiling; }
|
||||
|
||||
// Used to specify the context (cookie store, cache) for this request.
|
||||
URLRequestContext* context() { return context_.get(); }
|
||||
void set_context(URLRequestContext* context) { context_ = context; }
|
||||
URLRequestContext* context();
|
||||
void set_context(URLRequestContext* context);
|
||||
|
||||
// Returns the expected content size if available
|
||||
int64 GetExpectedContentSize() const;
|
||||
@@ -497,7 +486,7 @@ class URLRequest {
|
||||
// first transaction in a request involving redirects.
|
||||
uint64 final_upload_progress_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(URLRequest);
|
||||
DISALLOW_COPY_AND_ASSIGN(URLRequest);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -510,10 +499,7 @@ class URLRequest {
|
||||
struct URLRequestMetrics {
|
||||
int object_count;
|
||||
URLRequestMetrics() : object_count(0) {}
|
||||
~URLRequestMetrics() {
|
||||
DLOG_IF(WARNING, object_count != 0) <<
|
||||
"Leaking " << object_count << " URLRequest object(s)";
|
||||
}
|
||||
~URLRequestMetrics();
|
||||
};
|
||||
|
||||
extern URLRequestMetrics url_request_metrics;
|
||||
@@ -526,8 +512,6 @@ extern URLRequestMetrics url_request_metrics;
|
||||
#define URLREQUEST_COUNT_CTOR()
|
||||
#define URLREQUEST_COUNT_DTOR()
|
||||
|
||||
#endif
|
||||
|
||||
#endif // #ifndef NDEBUG
|
||||
|
||||
#endif // NET_URL_REQUEST_URL_REQUEST_H_
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
#include "base/string_util.h"
|
||||
#include "net/base/cookie_policy.h"
|
||||
#include "net/ftp/ftp_auth_cache.h"
|
||||
#include "net/http/http_transaction_factory.h"
|
||||
|
||||
namespace net {
|
||||
class HttpTransactionFactory;
|
||||
class CookieMonster;
|
||||
class ProxyService;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "base/message_loop.h"
|
||||
#include "net/base/net_errors.h"
|
||||
#include "net/url_request/url_request_status.h"
|
||||
|
||||
URLRequestErrorJob::URLRequestErrorJob(URLRequest* request, int error)
|
||||
: URLRequestJob(request), error_(error) {
|
||||
|
||||
@@ -20,7 +20,7 @@ class URLRequestFileJob : public URLRequestJob {
|
||||
|
||||
virtual void Start();
|
||||
virtual void Kill();
|
||||
virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read);
|
||||
virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read);
|
||||
virtual bool IsRedirectResponse(GURL* location, int* http_status_code);
|
||||
virtual bool GetMimeType(std::string* mime_type);
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
#include <set>
|
||||
|
||||
#include "base/logging.h"
|
||||
|
||||
URLRequestFilter* URLRequestFilter::shared_instance_ = NULL;
|
||||
|
||||
/* static */
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "net/base/net_util.h"
|
||||
#include "net/base/wininet_util.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/url_request/url_request_error_job.h"
|
||||
#include "net/base/escape.h"
|
||||
|
||||
|
||||
@@ -17,10 +17,12 @@
|
||||
#include "net/base/net_errors.h"
|
||||
#include "net/base/net_util.h"
|
||||
#include "net/base/sdch_manager.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/http/http_response_info.h"
|
||||
#include "net/http/http_transaction.h"
|
||||
#include "net/http/http_transaction_factory.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/url_request/url_request_error_job.h"
|
||||
|
||||
// TODO(darin): make sure the port blocking code is not lost
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
#ifndef NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_
|
||||
#define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/scoped_ptr.h"
|
||||
#include "net/base/auth.h"
|
||||
#include "net/base/completion_callback.h"
|
||||
#include "net/http/http_request_info.h"
|
||||
#include "net/url_request/url_request_job.h"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "net/base/net_errors.h"
|
||||
#include "net/base/net_util.h"
|
||||
#include "net/base/wininet_util.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/url_request/url_request_error_job.h"
|
||||
#include "net/url_request/url_request_ftp_job.h"
|
||||
#include "net/url_request/url_request_job_metrics.h"
|
||||
|
||||
@@ -8,14 +8,12 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/ref_counted.h"
|
||||
#include "net/base/auth.h"
|
||||
#include "net/base/filter.h"
|
||||
#include "net/base/load_states.h"
|
||||
#include "net/url_request/url_request_status.h"
|
||||
|
||||
namespace net {
|
||||
class AuthChallengeInfo;
|
||||
class HttpResponseInfo;
|
||||
class IOBuffer;
|
||||
class UploadData;
|
||||
@@ -23,6 +21,7 @@ class UploadData;
|
||||
|
||||
class GURL;
|
||||
class URLRequest;
|
||||
class URLRequestStatus;
|
||||
class URLRequestJobMetrics;
|
||||
|
||||
// The URLRequestJob is using RefCounterThreadSafe because some sub classes
|
||||
@@ -201,13 +200,13 @@ class URLRequestJob : public base::RefCountedThreadSafe<URLRequestJob> {
|
||||
void NotifyReadComplete(int bytes_read);
|
||||
|
||||
// Notifies the request that a start error has occurred.
|
||||
void NotifyStartError(const URLRequestStatus &status);
|
||||
void NotifyStartError(const URLRequestStatus& status);
|
||||
|
||||
// NotifyDone marks when we are done with a request. It is really
|
||||
// a glorified set_status, but also does internal state checking and
|
||||
// job tracking. It should be called once per request, when the job is
|
||||
// finished doing all IO.
|
||||
void NotifyDone(const URLRequestStatus &status);
|
||||
void NotifyDone(const URLRequestStatus& status);
|
||||
|
||||
// Some work performed by NotifyDone must be completed on a separate task
|
||||
// so as to avoid re-entering the delegate. This method exists to perform
|
||||
@@ -251,7 +250,7 @@ class URLRequestJob : public base::RefCountedThreadSafe<URLRequestJob> {
|
||||
const URLRequestStatus GetStatus();
|
||||
|
||||
// Set the status of the job.
|
||||
void SetStatus(const URLRequestStatus &status);
|
||||
void SetStatus(const URLRequestStatus& status);
|
||||
|
||||
// Whether the job is doing performance profiling
|
||||
bool is_profiling_;
|
||||
@@ -304,4 +303,3 @@ class URLRequestJob : public base::RefCountedThreadSafe<URLRequestJob> {
|
||||
};
|
||||
|
||||
#endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "base/message_loop.h"
|
||||
#include "net/base/net_errors.h"
|
||||
#include "net/url_request/url_request_status.h"
|
||||
|
||||
URLRequestSimpleJob::URLRequestSimpleJob(URLRequest* request)
|
||||
: URLRequestJob(request),
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H__
|
||||
#define NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H__
|
||||
#ifndef NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_
|
||||
#define NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_
|
||||
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "net/url_request/url_request_job.h"
|
||||
|
||||
class URLRequest;
|
||||
|
||||
class URLRequestSimpleJob : public URLRequestJob {
|
||||
public:
|
||||
URLRequestSimpleJob(URLRequest* request);
|
||||
@@ -32,5 +33,4 @@ class URLRequestSimpleJob : public URLRequestJob {
|
||||
int data_offset_;
|
||||
};
|
||||
|
||||
#endif // NET_URL_REQUEST_URL_REQUEST_DATA_JOB_H__
|
||||
|
||||
#endif // NET_URL_REQUEST_URL_REQUEST_DATA_JOB_H_
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "base/message_loop.h"
|
||||
#include "base/string_util.h"
|
||||
#include "net/base/net_errors.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
|
||||
// This emulates the global message loop for the test URL request class, since
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "net/disk_cache/disk_cache.h"
|
||||
#include "net/http/http_cache.h"
|
||||
#include "net/http/http_network_layer.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/proxy/proxy_service.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "net/base/net_errors.h"
|
||||
#include "net/http/http_network_layer.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/proxy/proxy_service.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "googleurl/src/url_util.h"
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
#include "net/base/escape.h"
|
||||
#include "net/disk_cache/disk_cache.h"
|
||||
#include "net/http/http_cache.h"
|
||||
#include "net/http/http_response_info.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
|
||||
#define VIEW_CACHE_HEAD \
|
||||
"<html><body><table>"
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef NET_URL_REQUEST_URL_REQUEST_VIEW_CACHE_JOB_H__
|
||||
#define NET_URL_REQUEST_URL_REQUEST_VIEW_CACHE_JOB_H__
|
||||
#ifndef NET_URL_REQUEST_URL_REQUEST_VIEW_CACHE_JOB_H_
|
||||
#define NET_URL_REQUEST_URL_REQUEST_VIEW_CACHE_JOB_H_
|
||||
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "net/url_request/url_request_simple_job.h"
|
||||
|
||||
namespace disk_cache {
|
||||
@@ -28,5 +29,4 @@ class URLRequestViewCacheJob : public URLRequestSimpleJob {
|
||||
disk_cache::Backend* GetDiskCache() const;
|
||||
};
|
||||
|
||||
#endif // NET_URL_REQUEST_URL_REQUEST_VIEW_CACHE_JOB_H__
|
||||
|
||||
#endif // NET_URL_REQUEST_URL_REQUEST_VIEW_CACHE_JOB_H_
|
||||
|
||||
@@ -65,6 +65,7 @@ input_files = [
|
||||
'plugins/plugin_string_stream.cc',
|
||||
'resource_fetcher.cc',
|
||||
'resource_handle_impl.cc',
|
||||
'resource_loader_bridge.cc',
|
||||
'searchable_form_data.cc',
|
||||
'stacking_order_iterator.cc',
|
||||
'webcursor.cc',
|
||||
@@ -76,10 +77,12 @@ input_files = [
|
||||
'webhistoryitem_impl.cc',
|
||||
'webkit_glue.cc',
|
||||
'webmediaplayer_impl.cc',
|
||||
'webplugin_delegate.cc',
|
||||
'webplugin_impl.cc',
|
||||
'webtextinput_impl.cc',
|
||||
'weburlrequest_impl.cc',
|
||||
'webwidget_impl.cc',
|
||||
'webview_delegate.cc',
|
||||
'webview_impl.cc',
|
||||
]
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@ MSVC_POP_WARNING();
|
||||
#include "webkit/glue/alt_error_page_resource_fetcher.h"
|
||||
|
||||
#include "webkit/glue/glue_util.h"
|
||||
#include "webkit/glue/webdatasource.h"
|
||||
#include "webkit/glue/webframe_impl.h"
|
||||
#include "webkit/glue/weburlrequest.h"
|
||||
#include "webkit/glue/webview_delegate.h"
|
||||
#include "webkit/glue/webview.h"
|
||||
|
||||
@@ -36,6 +38,9 @@ AltErrorPageResourceFetcher::AltErrorPageResourceFetcher(
|
||||
kDownloadTimeoutSec, this));
|
||||
}
|
||||
|
||||
AltErrorPageResourceFetcher::~AltErrorPageResourceFetcher() {
|
||||
}
|
||||
|
||||
void AltErrorPageResourceFetcher::OnURLFetchComplete(
|
||||
const WebCore::ResourceResponse& response,
|
||||
const std::string& data) {
|
||||
|
||||
@@ -13,13 +13,13 @@ MSVC_PUSH_WARNING_LEVEL(0);
|
||||
#include "Timer.h"
|
||||
MSVC_POP_WARNING();
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/scoped_ptr.h"
|
||||
#include "webkit/glue/resource_fetcher.h"
|
||||
#include "webkit/glue/weberror_impl.h"
|
||||
#include "webkit/glue/weburlrequest.h"
|
||||
|
||||
class ResourceFetcherWithTimeout;
|
||||
class WebFrameImpl;
|
||||
class WebRequest;
|
||||
class WebView;
|
||||
|
||||
// Used for downloading alternate dns error pages. Once downloading is done
|
||||
@@ -30,6 +30,7 @@ class AltErrorPageResourceFetcher : public ResourceFetcher::Delegate {
|
||||
const WebErrorImpl& web_error,
|
||||
WebFrameImpl* web_frame,
|
||||
const GURL& url);
|
||||
~AltErrorPageResourceFetcher();
|
||||
|
||||
virtual void OnURLFetchComplete(const WebCore::ResourceResponse& response,
|
||||
const std::string& data);
|
||||
@@ -44,7 +45,7 @@ class AltErrorPageResourceFetcher : public ResourceFetcher::Delegate {
|
||||
// Does the actual fetching.
|
||||
scoped_ptr<ResourceFetcherWithTimeout> fetcher_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(AltErrorPageResourceFetcher);
|
||||
DISALLOW_COPY_AND_ASSIGN(AltErrorPageResourceFetcher);
|
||||
};
|
||||
|
||||
#endif // WEBKIT_GLUE_ALT_ERROR_PAGE_RESOURCE_FETCHER_H__
|
||||
|
||||
@@ -31,6 +31,7 @@ MSVC_POP_WARNING();
|
||||
#include "webkit/glue/webframe_impl.h"
|
||||
#include "webkit/glue/webinputevent.h"
|
||||
#include "webkit/glue/webkit_glue.h"
|
||||
#include "webkit/glue/weburlrequest_impl.h"
|
||||
#include "webkit/glue/webview_delegate.h"
|
||||
#include "webkit/glue/webview_impl.h"
|
||||
#include "webkit/glue/webwidget_impl.h"
|
||||
|
||||
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário