summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 19:47:21 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 19:47:21 +0000
commit319d9e6f29cc2d27c0f72ce701d905d2402c350a (patch)
tree5d637ba43b9aeed5c925e694e50aa251230c0b92 /chrome/browser
parent22f21125f11953e1022f5e75e560c1af9484503e (diff)
downloadchromium_src-319d9e6f29cc2d27c0f72ce701d905d2402c350a.zip
chromium_src-319d9e6f29cc2d27c0f72ce701d905d2402c350a.tar.gz
chromium_src-319d9e6f29cc2d27c0f72ce701d905d2402c350a.tar.bz2
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
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/autocomplete/search_provider.cc2
-rw-r--r--chrome/browser/automation/automation_provider.cc1
-rw-r--r--chrome/browser/automation/url_request_mock_http_job.cc1
-rw-r--r--chrome/browser/automation/url_request_slow_download_job.cc1
-rw-r--r--chrome/browser/chrome_plugin_host.cc11
-rw-r--r--chrome/browser/debugger/debugger_contents.cc1
-rw-r--r--chrome/browser/dom_ui/dom_ui.cc1
-rw-r--r--chrome/browser/external_protocol_handler.cc1
-rw-r--r--chrome/browser/google_url_tracker.cc1
-rw-r--r--chrome/browser/google_url_tracker.h1
-rw-r--r--chrome/browser/ime_input.h9
-rw-r--r--chrome/browser/jsmessage_box_handler_win.cc1
-rw-r--r--chrome/browser/memory_details.cc8
-rw-r--r--chrome/browser/memory_details.h3
-rw-r--r--chrome/browser/net/dns_global.cc1
-rw-r--r--chrome/browser/net/dns_master.cc2
-rw-r--r--chrome/browser/net/sdch_dictionary_fetcher.cc2
-rw-r--r--chrome/browser/net/url_fetcher.cc113
-rw-r--r--chrome/browser/net/url_fetcher.h125
-rw-r--r--chrome/browser/net/url_fetcher_unittest.cc1
-rw-r--r--chrome/browser/plugin_process_host.cc1
-rw-r--r--chrome/browser/profile.cc3
-rw-r--r--chrome/browser/profile_manager.cc1
-rw-r--r--chrome/browser/renderer_host/buffered_resource_handler.cc2
-rw-r--r--chrome/browser/renderer_host/buffered_resource_handler.h1
-rw-r--r--chrome/browser/renderer_host/download_throttling_resource_handler.h1
-rw-r--r--chrome/browser/renderer_host/render_process_host.h3
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_win.h5
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.cc4
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.h4
-rw-r--r--chrome/browser/renderer_host/resource_handler.h9
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc1
-rw-r--r--chrome/browser/renderer_host/resource_request_details.h4
-rw-r--r--chrome/browser/renderer_host/save_file_resource_handler.cc6
-rw-r--r--chrome/browser/renderer_host/save_file_resource_handler.h5
-rw-r--r--chrome/browser/safe_browsing/protocol_manager.h4
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database.h2
-rw-r--r--chrome/browser/search_engines/template_url_fetcher.cc54
-rw-r--r--chrome/browser/search_engines/template_url_fetcher.h53
-rw-r--r--chrome/browser/views/blocked_popup_container.cc1
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc1
-rw-r--r--chrome/browser/views/bug_report_view.h8
-rw-r--r--chrome/browser/views/options/advanced_contents_view.cc1
-rw-r--r--chrome/browser/views/shell_dialogs_win.cc6
44 files changed, 253 insertions, 213 deletions
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc
index b160bb5..e931912 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -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"
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 0de0782..013325c 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -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;
diff --git a/chrome/browser/automation/url_request_mock_http_job.cc b/chrome/browser/automation/url_request_mock_http_job.cc
index ed384e6..9c0376f 100644
--- a/chrome/browser/automation/url_request_mock_http_job.cc
+++ b/chrome/browser/automation/url_request_mock_http_job.cc
@@ -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";
diff --git a/chrome/browser/automation/url_request_slow_download_job.cc b/chrome/browser/automation/url_request_slow_download_job.cc
index 71f71ca..e185204 100644
--- a/chrome/browser/automation/url_request_slow_download_job.cc
+++ b/chrome/browser/automation/url_request_slow_download_job.cc
@@ -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"
diff --git a/chrome/browser/chrome_plugin_host.cc b/chrome/browser/chrome_plugin_host.cc
index 88fd40e..963bca1 100644
--- a/chrome/browser/chrome_plugin_host.cc
+++ b/chrome/browser/chrome_plugin_host.cc
@@ -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;
diff --git a/chrome/browser/debugger/debugger_contents.cc b/chrome/browser/debugger/debugger_contents.cc
index 2756244..19565e8 100644
--- a/chrome/browser/debugger/debugger_contents.cc
+++ b/chrome/browser/debugger/debugger_contents.cc
@@ -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"
diff --git a/chrome/browser/dom_ui/dom_ui.cc b/chrome/browser/dom_ui/dom_ui.cc
index 65e7d3d..1fe8d99 100644
--- a/chrome/browser/dom_ui/dom_ui.cc
+++ b/chrome/browser/dom_ui/dom_ui.cc
@@ -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"
diff --git a/chrome/browser/external_protocol_handler.cc b/chrome/browser/external_protocol_handler.cc
index ff55afa..d438f64 100644
--- a/chrome/browser/external_protocol_handler.cc
+++ b/chrome/browser/external_protocol_handler.cc
@@ -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"
diff --git a/chrome/browser/google_url_tracker.cc b/chrome/browser/google_url_tracker.cc
index cdc2a4cd..2e26147 100644
--- a/chrome/browser/google_url_tracker.cc
+++ b/chrome/browser/google_url_tracker.cc
@@ -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/";
diff --git a/chrome/browser/google_url_tracker.h b/chrome/browser/google_url_tracker.h
index ce19f6c..e4edcf6 100644
--- a/chrome/browser/google_url_tracker.h
+++ b/chrome/browser/google_url_tracker.h
@@ -7,6 +7,7 @@
#include "chrome/browser/net/url_fetcher.h"
#include "chrome/common/notification_observer.h"
+#include "googleurl/src/gurl.h"
class PrefService;
diff --git a/chrome/browser/ime_input.h b/chrome/browser/ime_input.h
index 8175887..2f1d1b9 100644
--- a/chrome/browser/ime_input.h
+++ b/chrome/browser/ime_input.h
@@ -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_
diff --git a/chrome/browser/jsmessage_box_handler_win.cc b/chrome/browser/jsmessage_box_handler_win.cc
index 9c48f9e..541253e 100644
--- a/chrome/browser/jsmessage_box_handler_win.cc
+++ b/chrome/browser/jsmessage_box_handler_win.cc
@@ -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"
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
index 7c81d6f..6b692bf 100644
--- a/chrome/browser/memory_details.cc
+++ b/chrome/browser/memory_details.cc
@@ -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"
diff --git a/chrome/browser/memory_details.h b/chrome/browser/memory_details.h
index 17a00a1..f63a6f5 100644
--- a/chrome/browser/memory_details.h
+++ b/chrome/browser/memory_details.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"
diff --git a/chrome/browser/net/dns_global.cc b/chrome/browser/net/dns_global.cc
index 67e4265..4e1f1a2 100644
--- a/chrome/browser/net/dns_global.cc
+++ b/chrome/browser/net/dns_global.cc
@@ -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;
diff --git a/chrome/browser/net/dns_master.cc b/chrome/browser/net/dns_master.cc
index 34efe37..d58bb4b 100644
--- a/chrome/browser/net/dns_master.cc
+++ b/chrome/browser/net/dns_master.cc
@@ -6,7 +6,7 @@
#include "chrome/browser/net/dns_master.h"
-#include <sstream>
+#include <set>
#include "base/histogram.h"
#include "base/stats_counters.h"
diff --git a/chrome/browser/net/sdch_dictionary_fetcher.cc b/chrome/browser/net/sdch_dictionary_fetcher.cc
index 9bce5f3..3a36bde 100644
--- a/chrome/browser/net/sdch_dictionary_fetcher.cc
+++ b/chrome/browser/net/sdch_dictionary_fetcher.cc
@@ -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
diff --git a/chrome/browser/net/url_fetcher.cc b/chrome/browser/net/url_fetcher.cc
index 9e41f22..dcec935 100644
--- a/chrome/browser/net/url_fetcher.cc
+++ b/chrome/browser/net/url_fetcher.cc
@@ -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_;
+}
diff --git a/chrome/browser/net/url_fetcher.h b/chrome/browser/net/url_fetcher.h
index 044e61b..5485d7f 100644
--- a/chrome/browser/net/url_fetcher.h
+++ b/chrome/browser/net/url_fetcher.h
@@ -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_
diff --git a/chrome/browser/net/url_fetcher_unittest.cc b/chrome/browser/net/url_fetcher_unittest.cc
index 03b40d7..6a6e3ff 100644
--- a/chrome/browser/net/url_fetcher_unittest.cc
+++ b/chrome/browser/net/url_fetcher_unittest.cc
@@ -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"
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index 03a59ba..5cafff1 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -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"
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 0602de7..66f75d8 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -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
diff --git a/chrome/browser/profile_manager.cc b/chrome/browser/profile_manager.cc
index 7698f62..f93c5a9 100644
--- a/chrome/browser/profile_manager.cc
+++ b/chrome/browser/profile_manager.cc
@@ -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"
diff --git a/chrome/browser/renderer_host/buffered_resource_handler.cc b/chrome/browser/renderer_host/buffered_resource_handler.cc
index 66ef1f3..515b497 100644
--- a/chrome/browser/renderer_host/buffered_resource_handler.cc
+++ b/chrome/browser/renderer_host/buffered_resource_handler.cc
@@ -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 {
diff --git a/chrome/browser/renderer_host/buffered_resource_handler.h b/chrome/browser/renderer_host/buffered_resource_handler.h
index a612722..97907b5 100644
--- a/chrome/browser/renderer_host/buffered_resource_handler.h
+++ b/chrome/browser/renderer_host/buffered_resource_handler.h
@@ -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 {
diff --git a/chrome/browser/renderer_host/download_throttling_resource_handler.h b/chrome/browser/renderer_host/download_throttling_resource_handler.h
index 80c5a00..f280841 100644
--- a/chrome/browser/renderer_host/download_throttling_resource_handler.h
+++ b/chrome/browser/renderer_host/download_throttling_resource_handler.h
@@ -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
diff --git a/chrome/browser/renderer_host/render_process_host.h b/chrome/browser/renderer_host/render_process_host.h
index acb7a83..8b90b3d 100644
--- a/chrome/browser/renderer_host/render_process_host.h
+++ b/chrome/browser/renderer_host/render_process_host.h
@@ -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"
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.h b/chrome/browser/renderer_host/render_widget_host_view_win.h
index ff80c83..02887c5 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_win.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_win.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 {
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc
index 5c1bd26..2217a0e 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc
@@ -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"
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.h b/chrome/browser/renderer_host/resource_dispatcher_host.h
index 6dfdd6d..452798e 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.h
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.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"
diff --git a/chrome/browser/renderer_host/resource_handler.h b/chrome/browser/renderer_host/resource_handler.h
index 8973c77..01abcb5 100644
--- a/chrome/browser/renderer_host/resource_handler.h
+++ b/chrome/browser/renderer_host/resource_handler.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 {
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index 41f593a..8616e29 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -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"
diff --git a/chrome/browser/renderer_host/resource_request_details.h b/chrome/browser/renderer_host/resource_request_details.h
index 40e3709e..0e36478 100644
--- a/chrome/browser/renderer_host/resource_request_details.h
+++ b/chrome/browser/renderer_host/resource_request_details.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"
diff --git a/chrome/browser/renderer_host/save_file_resource_handler.cc b/chrome/browser/renderer_host/save_file_resource_handler.cc
index 139f5a00..c464664 100644
--- a/chrome/browser/renderer_host/save_file_resource_handler.cc
+++ b/chrome/browser/renderer_host/save_file_resource_handler.cc
@@ -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);
+}
diff --git a/chrome/browser/renderer_host/save_file_resource_handler.h b/chrome/browser/renderer_host/save_file_resource_handler.h
index 63d78ad..03f4a02 100644
--- a/chrome/browser/renderer_host/save_file_resource_handler.h
+++ b/chrome/browser/renderer_host/save_file_resource_handler.h
@@ -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_
diff --git a/chrome/browser/safe_browsing/protocol_manager.h b/chrome/browser/safe_browsing/protocol_manager.h
index 55c430a..6198ed4 100644
--- a/chrome/browser/safe_browsing/protocol_manager.h
+++ b/chrome/browser/safe_browsing/protocol_manager.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
diff --git a/chrome/browser/safe_browsing/safe_browsing_database.h b/chrome/browser/safe_browsing/safe_browsing_database.h
index 72ed129..a2575eb 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database.h
+++ b/chrome/browser/safe_browsing/safe_browsing_database.h
@@ -7,7 +7,7 @@
#include <deque>
#include <list>
-#include <string>
+#include <set>
#include <vector>
#include "base/file_path.h"
diff --git a/chrome/browser/search_engines/template_url_fetcher.cc b/chrome/browser/search_engines/template_url_fetcher.cc
index 5727e2d..d5f043e 100644
--- a/chrome/browser/search_engines/template_url_fetcher.cc
+++ b/chrome/browser/search_engines/template_url_fetcher.cc
@@ -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,
diff --git a/chrome/browser/search_engines/template_url_fetcher.h b/chrome/browser/search_engines/template_url_fetcher.h
index 7b429a7..dc042ba 100644
--- a/chrome/browser/search_engines/template_url_fetcher.h
+++ b/chrome/browser/search_engines/template_url_fetcher.h
@@ -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_; }
diff --git a/chrome/browser/views/blocked_popup_container.cc b/chrome/browser/views/blocked_popup_container.cc
index bde9f3a..1426ba8 100644
--- a/chrome/browser/views/blocked_popup_container.cc
+++ b/chrome/browser/views/blocked_popup_container.cc
@@ -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"
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index 2de1bf4..6832ddc 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -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"
diff --git a/chrome/browser/views/bug_report_view.h b/chrome/browser/views/bug_report_view.h
index 9ee7733..3f2d8a3 100644
--- a/chrome/browser/views/bug_report_view.h
+++ b/chrome/browser/views/bug_report_view.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_
diff --git a/chrome/browser/views/options/advanced_contents_view.cc b/chrome/browser/views/options/advanced_contents_view.cc
index ac20ed1..898db6f 100644
--- a/chrome/browser/views/options/advanced_contents_view.cc
+++ b/chrome/browser/views/options/advanced_contents_view.cc
@@ -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;
diff --git a/chrome/browser/views/shell_dialogs_win.cc b/chrome/browser/views/shell_dialogs_win.cc
index be3da01..ec3a92e 100644
--- a/chrome/browser/views/shell_dialogs_win.cc
+++ b/chrome/browser/views/shell_dialogs_win.cc
@@ -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"