diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-11 05:32:23 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-11 05:32:23 +0000 |
commit | 10c2d69eef670a8870a53c5a0afee74810d416d6 (patch) | |
tree | c7b102852b40953ebb1da5ecce5f2a9cab0eccdb /chrome/browser | |
parent | 8623b0f992684cf2bca8fc27f733ad1c31cdd8f8 (diff) | |
download | chromium_src-10c2d69eef670a8870a53c5a0afee74810d416d6.zip chromium_src-10c2d69eef670a8870a53c5a0afee74810d416d6.tar.gz chromium_src-10c2d69eef670a8870a53c5a0afee74810d416d6.tar.bz2 |
Move URLFetcherDelegate to net/ and split URLFetcher between net/ and content/
Temporarily make a shim content::URLFetcherDelegate class. A future CL
will replace all instances of content::URLFetcherDelegate with
net::URLFetcherDelegate and remove that class.
Move most URLFetcher methods to net::URLFetcher, except for the static
methods (which will be handled in a future CL) and AssociateWithRenderView,
which is content-specific.
Replace all instances of content::URLFetcher* in the URLFetcherDelegate
callbacks with net::URLFetcher* (except for rlz, which required its own special hack).
BUG=118220
TEST=
TBR=mnissler@chromium.org,jhawkins@chromium.org,cpu@chromium.org,estade@chromium.org,sky@chromium.org,joth@chromium.org,satish@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10386063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136514 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
69 files changed, 170 insertions, 161 deletions
diff --git a/chrome/browser/alternate_nav_url_fetcher.cc b/chrome/browser/alternate_nav_url_fetcher.cc index ddb51ce..e3ea11c 100644 --- a/chrome/browser/alternate_nav_url_fetcher.cc +++ b/chrome/browser/alternate_nav_url_fetcher.cc @@ -13,10 +13,10 @@ #include "chrome/common/chrome_notification_types.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/notification_service.h" -#include "content/public/common/url_fetcher.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" +#include "content/public/common/url_fetcher.h" #include "grit/generated_resources.h" #include "grit/theme_resources_standard.h" #include "net/base/load_flags.h" @@ -174,7 +174,7 @@ void AlternateNavURLFetcher::Observe( } void AlternateNavURLFetcher::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { DCHECK_EQ(fetcher_.get(), source); SetStatusFromURLFetch( source->GetURL(), source->GetStatus(), source->GetResponseCode()); diff --git a/chrome/browser/alternate_nav_url_fetcher.h b/chrome/browser/alternate_nav_url_fetcher.h index 7853a26..e9467f0 100644 --- a/chrome/browser/alternate_nav_url_fetcher.h +++ b/chrome/browser/alternate_nav_url_fetcher.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -9,9 +9,9 @@ #include <string> #include "base/memory/scoped_ptr.h" -#include "content/public/common/url_fetcher_delegate.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" +#include "content/public/common/url_fetcher_delegate.h" #include "googleurl/src/gurl.h" namespace content { @@ -60,7 +60,7 @@ class AlternateNavURLFetcher : public content::NotificationObserver, const content::NotificationDetails& details) OVERRIDE; // content::URLFetcherDelegate - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // Sets |controller_| to the supplied pointer and begins fetching // |alternate_nav_url_|. diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc index d6d34d7..2c92d50 100644 --- a/chrome/browser/autocomplete/search_provider.cc +++ b/chrome/browser/autocomplete/search_provider.cc @@ -21,11 +21,11 @@ #include "chrome/browser/autocomplete/autocomplete_match.h" #include "chrome/browser/autocomplete/keyword_provider.h" #include "chrome/browser/history/history.h" +#include "chrome/browser/history/in_memory_database.h" #include "chrome/browser/instant/instant_controller.h" #include "chrome/browser/net/url_fixer_upper.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/history/in_memory_database.h" #include "chrome/browser/search_engines/search_engine_type.h" #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/search_engines/template_url_service_factory.h" @@ -305,7 +305,7 @@ void SearchProvider::Stop() { default_provider_suggest_text_.clear(); } -void SearchProvider::OnURLFetchComplete(const content::URLFetcher* source) { +void SearchProvider::OnURLFetchComplete(const net::URLFetcher* source) { DCHECK(!done_); suggest_results_pending_--; DCHECK_GE(suggest_results_pending_, 0); // Should never go negative. diff --git a/chrome/browser/autocomplete/search_provider.h b/chrome/browser/autocomplete/search_provider.h index 856bd0b..43e551c 100644 --- a/chrome/browser/autocomplete/search_provider.h +++ b/chrome/browser/autocomplete/search_provider.h @@ -73,7 +73,7 @@ class SearchProvider : public AutocompleteProvider, virtual void Stop() OVERRIDE; // content::URLFetcherDelegate - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // ID used in creating URLFetcher for default provider's suggest results. static const int kDefaultProviderURLFetcherID; diff --git a/chrome/browser/autofill/autofill_download.cc b/chrome/browser/autofill/autofill_download.cc index 6389780..63ea072 100644 --- a/chrome/browser/autofill/autofill_download.cc +++ b/chrome/browser/autofill/autofill_download.cc @@ -239,9 +239,9 @@ std::string AutofillDownloadManager::GetCombinedSignature( } void AutofillDownloadManager::OnURLFetchComplete( - const content::URLFetcher* source) { - std::map<content::URLFetcher *, FormRequestData>::iterator it = - url_fetchers_.find(const_cast<content::URLFetcher*>(source)); + const net::URLFetcher* source) { + std::map<net::URLFetcher *, FormRequestData>::iterator it = + url_fetchers_.find(const_cast<net::URLFetcher*>(source)); if (it == url_fetchers_.end()) { // Looks like crash on Mac is possibly caused with callback entering here // with unknown fetcher when network is refreshed. diff --git a/chrome/browser/autofill/autofill_download.h b/chrome/browser/autofill/autofill_download.h index 9a27b15..4a85d66 100644 --- a/chrome/browser/autofill/autofill_download.h +++ b/chrome/browser/autofill/autofill_download.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -23,6 +23,10 @@ class AutofillMetrics; class FormStructure; class Profile; +namespace net { +class URLFetcher; +} // namespace net + // Handles getting and updating Autofill heuristics. class AutofillDownloadManager : public content::URLFetcherDelegate { public: @@ -111,7 +115,7 @@ class AutofillDownloadManager : public content::URLFetcherDelegate { const std::vector<std::string>& forms_in_query) const; // content::URLFetcherDelegate implementation: - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // Probability of the form upload. Between 0 (no upload) and 1 (upload all). // GetPositiveUploadRate() is for matched forms, @@ -132,7 +136,7 @@ class AutofillDownloadManager : public content::URLFetcherDelegate { // For each requested form for both query and upload we create a separate // request and save its info. As url fetcher is identified by its address // we use a map between fetchers and info. - std::map<content::URLFetcher*, FormRequestData> url_fetchers_; + std::map<net::URLFetcher*, FormRequestData> url_fetchers_; // Cached QUERY requests. QueryRequestCache cached_forms_; diff --git a/chrome/browser/chrome_to_mobile_service.cc b/chrome/browser/chrome_to_mobile_service.cc index d5dfaca..d6bab02 100644 --- a/chrome/browser/chrome_to_mobile_service.cc +++ b/chrome/browser/chrome_to_mobile_service.cc @@ -285,7 +285,7 @@ void ChromeToMobileService::LogMetric(Metric metric) { } void ChromeToMobileService::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { if (source == account_info_request_.get()) HandleAccountInfoResponse(); else if (source == search_request_.get()) @@ -481,7 +481,7 @@ void ChromeToMobileService::HandleSearchResponse() { } void ChromeToMobileService::HandleSubmitResponse( - const content::URLFetcher* source) { + const net::URLFetcher* source) { // Get the observer for this response; bail if there is none or it is NULL. RequestObserverMap::iterator i = request_observer_map_.find(source); if (i == request_observer_map_.end()) diff --git a/chrome/browser/chrome_to_mobile_service.h b/chrome/browser/chrome_to_mobile_service.h index a6a9fd5..329244c 100644 --- a/chrome/browser/chrome_to_mobile_service.h +++ b/chrome/browser/chrome_to_mobile_service.h @@ -120,7 +120,7 @@ class ChromeToMobileService : public ProfileKeyedService, virtual void LogMetric(Metric metric); // content::URLFetcherDelegate method. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // content::NotificationObserver method. virtual void Observe(int type, @@ -155,7 +155,7 @@ class ChromeToMobileService : public ProfileKeyedService, void HandleAccountInfoResponse(); void HandleSearchResponse(); - void HandleSubmitResponse(const content::URLFetcher* source); + void HandleSubmitResponse(const net::URLFetcher* source); base::WeakPtrFactory<ChromeToMobileService> weak_ptr_factory_; @@ -175,7 +175,7 @@ class ChromeToMobileService : public ProfileKeyedService, std::set<FilePath> snapshots_; // Map URLFetchers to observers for reporting OnSendComplete. - typedef std::map<const content::URLFetcher*, base::WeakPtr<Observer> > + typedef std::map<const net::URLFetcher*, base::WeakPtr<Observer> > RequestObserverMap; RequestObserverMap request_observer_map_; diff --git a/chrome/browser/chromeos/customization_document.cc b/chrome/browser/chromeos/customization_document.cc index 01bdb8e..b0ae177 100644 --- a/chrome/browser/chromeos/customization_document.cc +++ b/chrome/browser/chromeos/customization_document.cc @@ -303,7 +303,7 @@ void ServicesCustomizationDocument::StartFileFetch() { } void ServicesCustomizationDocument::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { if (source->GetResponseCode() == 200) { std::string data; source->GetResponseAsString(&data); diff --git a/chrome/browser/chromeos/customization_document.h b/chrome/browser/chromeos/customization_document.h index a60a136..aef946c 100644 --- a/chrome/browser/chromeos/customization_document.h +++ b/chrome/browser/chromeos/customization_document.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -149,7 +149,7 @@ class ServicesCustomizationDocument : public CustomizationDocument, static void SetApplied(bool val); // Overriden from content::URLFetcherDelegate: - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // Initiate file fetching. void StartFileFetch(); diff --git a/chrome/browser/chromeos/gdata/gdata_operations.cc b/chrome/browser/chromeos/gdata/gdata_operations.cc index 2b29fae..be08bd5 100644 --- a/chrome/browser/chromeos/gdata/gdata_operations.cc +++ b/chrome/browser/chromeos/gdata/gdata_operations.cc @@ -309,7 +309,7 @@ void UrlFetchOperationBase::DoCancel() { RunCallbackOnPrematureFailure(GDATA_CANCELLED); } -void UrlFetchOperationBase::OnURLFetchComplete(const URLFetcher* source) { +void UrlFetchOperationBase::OnURLFetchComplete(const net::URLFetcher* source) { GDataErrorCode code = static_cast<GDataErrorCode>(source->GetResponseCode()); DVLOG(1) << "Response headers:\n" << GetResponseHeadersAsString(source); @@ -352,7 +352,7 @@ void UrlFetchOperationBase::OnAuthFailed(GDataErrorCode code) { } std::string UrlFetchOperationBase::GetResponseHeadersAsString( - const URLFetcher* url_fetcher) { + const net::URLFetcher* url_fetcher) { // net::HttpResponseHeaders::raw_headers(), as the name implies, stores // all headers in their raw format, i.e each header is null-terminated. // So logging raw_headers() only shows the first header, which is probably @@ -387,7 +387,8 @@ GURL EntryActionOperation::GetURL() const { return AddStandardUrlParams(document_url_); } -bool EntryActionOperation::ProcessURLFetchResults(const URLFetcher* source) { +bool EntryActionOperation::ProcessURLFetchResults( + const net::URLFetcher* source) { if (!callback_.is_null()) { GDataErrorCode code = static_cast<GDataErrorCode>(source->GetResponseCode()); @@ -411,7 +412,7 @@ GetDataOperation::GetDataOperation(GDataOperationRegistry* registry, GetDataOperation::~GetDataOperation() {} -bool GetDataOperation::ProcessURLFetchResults(const URLFetcher* source) { +bool GetDataOperation::ProcessURLFetchResults(const net::URLFetcher* source) { std::string data; source->GetResponseAsString(&data); scoped_ptr<base::Value> root_value; @@ -544,9 +545,10 @@ GURL DownloadFileOperation::GetURL() const { return document_url_; } -void DownloadFileOperation::OnURLFetchDownloadProgress(const URLFetcher* source, - int64 current, - int64 total) { +void DownloadFileOperation::OnURLFetchDownloadProgress( + const net::URLFetcher* source, + int64 current, + int64 total) { NotifyProgress(current, total); } @@ -555,13 +557,14 @@ bool DownloadFileOperation::ShouldSendDownloadData() { } void DownloadFileOperation::OnURLFetchDownloadData( - const URLFetcher* source, + const net::URLFetcher* source, scoped_ptr<std::string> download_data) { if (!get_download_data_callback_.is_null()) get_download_data_callback_.Run(HTTP_SUCCESS, download_data.Pass()); } -bool DownloadFileOperation::ProcessURLFetchResults(const URLFetcher* source) { +bool DownloadFileOperation::ProcessURLFetchResults( + const net::URLFetcher* source) { GDataErrorCode code = static_cast<GDataErrorCode>(source->GetResponseCode()); // Take over the ownership of the the downloaded temp file. @@ -848,7 +851,8 @@ GURL InitiateUploadOperation::GetURL() const { return initiate_upload_url_; } -bool InitiateUploadOperation::ProcessURLFetchResults(const URLFetcher* source) { +bool InitiateUploadOperation::ProcessURLFetchResults( + const net::URLFetcher* source) { GDataErrorCode code = static_cast<GDataErrorCode>(source->GetResponseCode()); @@ -933,7 +937,8 @@ GURL ResumeUploadOperation::GetURL() const { return params_.upload_location; } -bool ResumeUploadOperation::ProcessURLFetchResults(const URLFetcher* source) { +bool ResumeUploadOperation::ProcessURLFetchResults( + const net::URLFetcher* source) { GDataErrorCode code = static_cast<GDataErrorCode>(source->GetResponseCode()); net::HttpResponseHeaders* hdrs = source->GetResponseHeaders(); int64 start_range_received = -1; @@ -1043,7 +1048,7 @@ bool ResumeUploadOperation::GetContentData(std::string* upload_content_type, } void ResumeUploadOperation::OnURLFetchUploadProgress( - const content::URLFetcher* source, int64 current, int64 total) { + const net::URLFetcher* source, int64 current, int64 total) { // Adjust the progress values according to the range currently uploaded. NotifyProgress(params_.start_range + current, params_.content_length); } diff --git a/chrome/browser/chromeos/gdata/gdata_operations.h b/chrome/browser/chromeos/gdata/gdata_operations.h index 76e9764..8db4fc8 100644 --- a/chrome/browser/chromeos/gdata/gdata_operations.h +++ b/chrome/browser/chromeos/gdata/gdata_operations.h @@ -115,7 +115,7 @@ class UrlFetchOperationBase : public GDataOperationInterface, // Invoked by OnURLFetchComplete when the operation completes without an // authentication error. Must be implemented by a derived class. - virtual bool ProcessURLFetchResults(const content::URLFetcher* source) = 0; + virtual bool ProcessURLFetchResults(const net::URLFetcher* source) = 0; // Invoked when it needs to notify the status. Chunked operations that // constructs a logically single operation from multiple physical operations @@ -131,13 +131,13 @@ class UrlFetchOperationBase : public GDataOperationInterface, virtual void DoCancel() OVERRIDE; // Overridden from URLFetcherDelegate. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // Overridden from GDataOperationInterface. virtual void OnAuthFailed(GDataErrorCode code) OVERRIDE; std::string GetResponseHeadersAsString( - const content::URLFetcher* url_fetcher); + const net::URLFetcher* url_fetcher); Profile* profile_; ReAuthenticateCallback re_authenticate_callback_; @@ -163,7 +163,7 @@ class EntryActionOperation : public UrlFetchOperationBase { protected: // Overridden from UrlFetchOperationBase. virtual GURL GetURL() const OVERRIDE; - virtual bool ProcessURLFetchResults(const content::URLFetcher* source) + virtual bool ProcessURLFetchResults(const net::URLFetcher* source) OVERRIDE; virtual void RunCallbackOnPrematureFailure(GDataErrorCode code) OVERRIDE; @@ -191,7 +191,7 @@ class GetDataOperation : public UrlFetchOperationBase { protected: // Overridden from UrlFetchOperationBase. - virtual bool ProcessURLFetchResults(const content::URLFetcher* source) + virtual bool ProcessURLFetchResults(const net::URLFetcher* source) OVERRIDE; virtual void RunCallbackOnPrematureFailure(GDataErrorCode code) OVERRIDE; @@ -264,16 +264,16 @@ class DownloadFileOperation : public UrlFetchOperationBase { protected: // Overridden from UrlFetchOperationBase. virtual GURL GetURL() const OVERRIDE; - virtual bool ProcessURLFetchResults(const content::URLFetcher* source) + virtual bool ProcessURLFetchResults(const net::URLFetcher* source) OVERRIDE; virtual void RunCallbackOnPrematureFailure(GDataErrorCode code) OVERRIDE; // Overridden from content::URLFetcherDelegate. - virtual void OnURLFetchDownloadProgress(const content::URLFetcher* source, + virtual void OnURLFetchDownloadProgress(const net::URLFetcher* source, int64 current, int64 total) OVERRIDE; virtual bool ShouldSendDownloadData() OVERRIDE; virtual void OnURLFetchDownloadData( - const content::URLFetcher* source, + const net::URLFetcher* source, scoped_ptr<std::string> download_data) OVERRIDE; private: @@ -459,7 +459,7 @@ class InitiateUploadOperation : public UrlFetchOperationBase { protected: // Overridden from UrlFetchOperationBase. virtual GURL GetURL() const OVERRIDE; - virtual bool ProcessURLFetchResults(const content::URLFetcher* source) + virtual bool ProcessURLFetchResults(const net::URLFetcher* source) OVERRIDE; virtual void NotifySuccessToOperationRegistry() OVERRIDE; virtual void RunCallbackOnPrematureFailure(GDataErrorCode code) OVERRIDE; @@ -492,7 +492,7 @@ class ResumeUploadOperation : public UrlFetchOperationBase { protected: // Overridden from UrlFetchOperationBase. virtual GURL GetURL() const OVERRIDE; - virtual bool ProcessURLFetchResults(const content::URLFetcher* source) + virtual bool ProcessURLFetchResults(const net::URLFetcher* source) OVERRIDE; virtual void NotifyStartToOperationRegistry() OVERRIDE; virtual void NotifySuccessToOperationRegistry() OVERRIDE; @@ -505,7 +505,7 @@ class ResumeUploadOperation : public UrlFetchOperationBase { std::string* upload_content) OVERRIDE; // Overridden from content::UrlFetcherDelegate - virtual void OnURLFetchUploadProgress(const content::URLFetcher* source, + virtual void OnURLFetchUploadProgress(const net::URLFetcher* source, int64 current, int64 total) OVERRIDE; private: diff --git a/chrome/browser/chromeos/imageburner/burn_manager.cc b/chrome/browser/chromeos/imageburner/burn_manager.cc index f784623..5b0a61d 100644 --- a/chrome/browser/chromeos/imageburner/burn_manager.cc +++ b/chrome/browser/chromeos/imageburner/burn_manager.cc @@ -306,7 +306,7 @@ void BurnManager::CancelImageFetch() { image_fetcher_.reset(); } -void BurnManager::OnURLFetchComplete(const content::URLFetcher* source) { +void BurnManager::OnURLFetchComplete(const net::URLFetcher* source) { const bool success = source->GetStatus().status() == net::URLRequestStatus::SUCCESS; if (source == config_fetcher_.get()) { @@ -323,7 +323,7 @@ void BurnManager::OnURLFetchComplete(const content::URLFetcher* source) { } } -void BurnManager::OnURLFetchDownloadProgress(const content::URLFetcher* source, +void BurnManager::OnURLFetchDownloadProgress(const net::URLFetcher* source, int64 current, int64 total) { if (source == image_fetcher_.get()) { diff --git a/chrome/browser/chromeos/imageburner/burn_manager.h b/chrome/browser/chromeos/imageburner/burn_manager.h index 15a4622..8b79979 100644 --- a/chrome/browser/chromeos/imageburner/burn_manager.h +++ b/chrome/browser/chromeos/imageburner/burn_manager.h @@ -201,8 +201,8 @@ class BurnManager : content::URLFetcherDelegate { void CancelImageFetch(); // URLFetcherDelegate overrides: - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; - virtual void OnURLFetchDownloadProgress(const content::URLFetcher* source, + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchDownloadProgress(const net::URLFetcher* source, int64 current, int64 total) OVERRIDE; diff --git a/chrome/browser/component_updater/component_updater_service.cc b/chrome/browser/component_updater/component_updater_service.cc index b24d100..99df4d6 100644 --- a/chrome/browser/component_updater/component_updater_service.cc +++ b/chrome/browser/component_updater/component_updater_service.cc @@ -28,8 +28,8 @@ #include "content/public/browser/notification_service.h" #include "content/public/browser/utility_process_host.h" #include "content/public/browser/utility_process_host_client.h" -#include "content/public/common/url_fetcher_delegate.h" #include "content/public/common/url_fetcher.h" +#include "content/public/common/url_fetcher_delegate.h" #include "googleurl/src/gurl.h" #include "net/base/escape.h" #include "net/base/load_flags.h" @@ -117,7 +117,7 @@ class DelegateWithContext : public content::URLFetcherDelegate { DelegateWithContext(Del* delegate, Ctx* context) : delegate_(delegate), context_(context) {} - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE { + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE { delegate_->OnURLFetchComplete(source, context_); delete this; } @@ -152,7 +152,7 @@ void StartFetch(content::URLFetcher* fetcher, } // Returs true if the url request of |fetcher| was succesful. -bool FetchSuccess(const content::URLFetcher& fetcher) { +bool FetchSuccess(const net::URLFetcher& fetcher) { return (fetcher.GetStatus().status() == net::URLRequestStatus::SUCCESS) && (fetcher.GetResponseCode() == 200); } @@ -289,10 +289,10 @@ class CrxUpdateService : public ComponentUpdateService { CRXContext() : installer(NULL) {} }; - void OnURLFetchComplete(const content::URLFetcher* source, + void OnURLFetchComplete(const net::URLFetcher* source, UpdateContext* context); - void OnURLFetchComplete(const content::URLFetcher* source, + void OnURLFetchComplete(const net::URLFetcher* source, CRXContext* context); private: @@ -574,7 +574,7 @@ void CrxUpdateService::ProcessPendingItems() { // Caled when we got a response from the update server. It consists of an xml // document following the omaha update scheme. -void CrxUpdateService::OnURLFetchComplete(const content::URLFetcher* source, +void CrxUpdateService::OnURLFetchComplete(const net::URLFetcher* source, UpdateContext* context) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); if (FetchSuccess(*source)) { @@ -679,7 +679,7 @@ void CrxUpdateService::OnParseUpdateManifestFailed( // Called when the CRX package has been downloaded to a temporary location. // Here we fire the notifications and schedule the component-specific installer // to be called in the file thread. -void CrxUpdateService::OnURLFetchComplete(const content::URLFetcher* source, +void CrxUpdateService::OnURLFetchComplete(const net::URLFetcher* source, CRXContext* context) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); base::PlatformFileError error_code; diff --git a/chrome/browser/extensions/app_notify_channel_setup.cc b/chrome/browser/extensions/app_notify_channel_setup.cc index bdce1d5..b3921f6 100644 --- a/chrome/browser/extensions/app_notify_channel_setup.cc +++ b/chrome/browser/extensions/app_notify_channel_setup.cc @@ -10,8 +10,8 @@ #include "base/basictypes.h" #include "base/bind.h" #include "base/command_line.h" -#include "base/message_loop.h" #include "base/json/json_reader.h" +#include "base/message_loop.h" #include "base/metrics/histogram.h" #include "base/stringprintf.h" #include "chrome/browser/prefs/pref_service.h" @@ -126,7 +126,7 @@ void AppNotifyChannelSetup::OnSyncSetupResult(bool enabled) { EndLogin(enabled); } -void AppNotifyChannelSetup::OnURLFetchComplete(const URLFetcher* source) { +void AppNotifyChannelSetup::OnURLFetchComplete(const net::URLFetcher* source) { CHECK(source); switch (state_) { case RECORD_GRANT_STARTED: @@ -269,7 +269,7 @@ void AppNotifyChannelSetup::BeginRecordGrant() { url_fetcher_->Start(); } -void AppNotifyChannelSetup::EndRecordGrant(const URLFetcher* source) { +void AppNotifyChannelSetup::EndRecordGrant(const net::URLFetcher* source) { CHECK_EQ(RECORD_GRANT_STARTED, state_); net::URLRequestStatus status = source->GetStatus(); @@ -300,7 +300,7 @@ void AppNotifyChannelSetup::BeginGetChannelId() { url_fetcher_->Start(); } -void AppNotifyChannelSetup::EndGetChannelId(const URLFetcher* source) { +void AppNotifyChannelSetup::EndGetChannelId(const net::URLFetcher* source) { CHECK_EQ(CHANNEL_ID_SETUP_STARTED, state_); net::URLRequestStatus status = source->GetStatus(); diff --git a/chrome/browser/extensions/app_notify_channel_setup.h b/chrome/browser/extensions/app_notify_channel_setup.h index 187c068..e83420b 100644 --- a/chrome/browser/extensions/app_notify_channel_setup.h +++ b/chrome/browser/extensions/app_notify_channel_setup.h @@ -98,7 +98,7 @@ class AppNotifyChannelSetup protected: // content::URLFetcherDelegate. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // AppNotifyChannelUI::Delegate. virtual void OnSyncSetupResult(bool enabled) OVERRIDE; @@ -132,9 +132,9 @@ class AppNotifyChannelSetup void BeginGetAccessToken(); void EndGetAccessToken(bool success); void BeginRecordGrant(); - void EndRecordGrant(const content::URLFetcher* source); + void EndRecordGrant(const net::URLFetcher* source); void BeginGetChannelId(); - void EndGetChannelId(const content::URLFetcher* source); + void EndGetChannelId(const net::URLFetcher* source); void ReportResult(const std::string& channel_id, SetupError error); diff --git a/chrome/browser/extensions/apps_promo.cc b/chrome/browser/extensions/apps_promo.cc index e034c19..b9d4365 100644 --- a/chrome/browser/extensions/apps_promo.cc +++ b/chrome/browser/extensions/apps_promo.cc @@ -10,9 +10,9 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" -#include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" #include "content/public/browser/notification_service.h" #include "content/public/common/url_constants.h" @@ -331,7 +331,7 @@ AppsPromoLogoFetcher::AppsPromoLogoFetcher( AppsPromoLogoFetcher::~AppsPromoLogoFetcher() {} void AppsPromoLogoFetcher::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { std::string data; std::string base64_data; diff --git a/chrome/browser/extensions/apps_promo.h b/chrome/browser/extensions/apps_promo.h index 37501c7..b132a39 100644 --- a/chrome/browser/extensions/apps_promo.h +++ b/chrome/browser/extensions/apps_promo.h @@ -149,7 +149,7 @@ class AppsPromoLogoFetcher : public content::URLFetcherDelegate { const AppsPromo::PromoData& promo_data); virtual ~AppsPromoLogoFetcher(); - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; private: // Fetches the logo and stores the result as a data URL. diff --git a/chrome/browser/extensions/updater/extension_downloader.cc b/chrome/browser/extensions/updater/extension_downloader.cc index 9f345f4..2b3a3b4 100644 --- a/chrome/browser/extensions/updater/extension_downloader.cc +++ b/chrome/browser/extensions/updater/extension_downloader.cc @@ -355,7 +355,7 @@ void ExtensionDownloader::StartUpdateCheck(ManifestFetchData* fetch_data) { } void ExtensionDownloader::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { VLOG(2) << source->GetResponseCode() << " " << source->GetURL(); if (source == manifest_fetcher_.get()) { @@ -576,7 +576,7 @@ void ExtensionDownloader::FetchUpdatedExtension(const std::string& id, } void ExtensionDownloader::OnCRXFetchComplete( - const content::URLFetcher* source, + const net::URLFetcher* source, const GURL& url, const net::URLRequestStatus& status, int response_code) { diff --git a/chrome/browser/extensions/updater/extension_downloader.h b/chrome/browser/extensions/updater/extension_downloader.h index b59c125..bd885d1 100644 --- a/chrome/browser/extensions/updater/extension_downloader.h +++ b/chrome/browser/extensions/updater/extension_downloader.h @@ -119,7 +119,7 @@ class ExtensionDownloader : public content::URLFetcherDelegate { void StartUpdateCheck(ManifestFetchData* fetch_data); // content::URLFetcherDelegate implementation. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // Handles the result of a manifest fetch. void OnManifestFetchComplete(const GURL& url, @@ -145,7 +145,7 @@ class ExtensionDownloader : public content::URLFetcherDelegate { const std::string& version); // Handles the result of a crx fetch. - void OnCRXFetchComplete(const content::URLFetcher* source, + void OnCRXFetchComplete(const net::URLFetcher* source, const GURL& url, const net::URLRequestStatus& status, int response_code); diff --git a/chrome/browser/extensions/webstore_inline_installer.cc b/chrome/browser/extensions/webstore_inline_installer.cc index 4a56420..e563905 100644 --- a/chrome/browser/extensions/webstore_inline_installer.cc +++ b/chrome/browser/extensions/webstore_inline_installer.cc @@ -19,9 +19,9 @@ #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/url_pattern.h" #include "chrome/common/url_constants.h" -#include "content/public/browser/web_contents.h" #include "content/public/browser/utility_process_host.h" #include "content/public/browser/utility_process_host_client.h" +#include "content/public/browser/web_contents.h" #include "content/public/common/url_fetcher.h" #include "net/base/escape.h" #include "net/base/load_flags.h" @@ -189,7 +189,7 @@ void WebstoreInlineInstaller::BeginInstall() { WebstoreInlineInstaller::~WebstoreInlineInstaller() {} void WebstoreInlineInstaller::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { CHECK_EQ(webstore_data_url_fetcher_.get(), source); // We shouldn't be getting UrlFetcher callbacks if the WebContents has gone // away; we stop any in in-progress fetches in WebContentsDestroyed. diff --git a/chrome/browser/extensions/webstore_inline_installer.h b/chrome/browser/extensions/webstore_inline_installer.h index 1d87c24..9a8cd60 100644 --- a/chrome/browser/extensions/webstore_inline_installer.h +++ b/chrome/browser/extensions/webstore_inline_installer.h @@ -12,8 +12,8 @@ #include "base/memory/scoped_ptr.h" #include "base/values.h" #include "chrome/browser/extensions/extension_install_ui.h" -#include "chrome/browser/extensions/webstore_installer.h" #include "chrome/browser/extensions/webstore_install_helper.h" +#include "chrome/browser/extensions/webstore_installer.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/common/url_fetcher_delegate.h" #include "googleurl/src/gurl.h" @@ -73,7 +73,7 @@ class WebstoreInlineInstaller // informs our delegate of success/failure. // content::URLFetcherDelegate interface implementation. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // Client callbacks for SafeWebstoreResponseParser when parsing is complete. void OnWebstoreResponseParseSuccess(DictionaryValue* webstore_data); diff --git a/chrome/browser/extensions/webstore_install_helper.cc b/chrome/browser/extensions/webstore_install_helper.cc index af5ec88..a8784ef 100644 --- a/chrome/browser/extensions/webstore_install_helper.cc +++ b/chrome/browser/extensions/webstore_install_helper.cc @@ -84,7 +84,7 @@ void WebstoreInstallHelper::StartWorkOnIOThread() { } void WebstoreInstallHelper::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); CHECK(source == url_fetcher_.get()); if (source->GetStatus().status() != net::URLRequestStatus::SUCCESS || diff --git a/chrome/browser/extensions/webstore_install_helper.h b/chrome/browser/extensions/webstore_install_helper.h index 4441f51..06a1440 100644 --- a/chrome/browser/extensions/webstore_install_helper.h +++ b/chrome/browser/extensions/webstore_install_helper.h @@ -79,7 +79,7 @@ class WebstoreInstallHelper : public content::UtilityProcessHostClient, void ReportResultFromUIThread(); // Implementing the content::URLFetcherDelegate interface. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // Implementing pieces of the UtilityProcessHostClient interface. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; diff --git a/chrome/browser/feedback/feedback_util.cc b/chrome/browser/feedback/feedback_util.cc index b7a5c0c..633f95b 100644 --- a/chrome/browser/feedback/feedback_util.cc +++ b/chrome/browser/feedback/feedback_util.cc @@ -96,7 +96,7 @@ class FeedbackUtil::PostCleanup : public content::URLFetcherDelegate { post_body_(post_body), previous_delay_(previous_delay) { } // Overridden from content::URLFetcherDelegate. - virtual void OnURLFetchComplete(const content::URLFetcher* source); + virtual void OnURLFetchComplete(const net::URLFetcher* source); protected: virtual ~PostCleanup() {} @@ -113,7 +113,7 @@ class FeedbackUtil::PostCleanup : public content::URLFetcherDelegate { // post cleanup object - that pointer will be deleted and deleted only on a // successful post to the feedback server. void FeedbackUtil::PostCleanup::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { std::stringstream error_stream; int response_code = source->GetResponseCode(); if (response_code == kHttpPostSuccessNoContent) { diff --git a/chrome/browser/google/google_url_tracker.cc b/chrome/browser/google/google_url_tracker.cc index 82a4283..838ed93 100644 --- a/chrome/browser/google/google_url_tracker.cc +++ b/chrome/browser/google/google_url_tracker.cc @@ -298,7 +298,7 @@ void GoogleURLTracker::StartFetchIfDesirable() { fetcher_->Start(); } -void GoogleURLTracker::OnURLFetchComplete(const content::URLFetcher* source) { +void GoogleURLTracker::OnURLFetchComplete(const net::URLFetcher* source) { // Delete the fetcher on this function's exit. scoped_ptr<content::URLFetcher> clean_up_fetcher(fetcher_.release()); diff --git a/chrome/browser/google/google_url_tracker.h b/chrome/browser/google/google_url_tracker.h index 2b90452..6b4a113 100644 --- a/chrome/browser/google/google_url_tracker.h +++ b/chrome/browser/google/google_url_tracker.h @@ -14,10 +14,10 @@ #include "base/memory/weak_ptr.h" #include "chrome/browser/profiles/profile_keyed_service.h" #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" -#include "content/public/common/url_fetcher.h" -#include "content/public/common/url_fetcher_delegate.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" +#include "content/public/common/url_fetcher.h" +#include "content/public/common/url_fetcher_delegate.h" #include "googleurl/src/gurl.h" #include "net/base/network_change_notifier.h" @@ -118,7 +118,7 @@ class GoogleURLTracker : public content::URLFetcherDelegate, void StartFetchIfDesirable(); // content::URLFetcherDelegate: - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // content::NotificationObserver: virtual void Observe(int type, diff --git a/chrome/browser/importer/toolbar_importer.cc b/chrome/browser/importer/toolbar_importer.cc index e62755e..f3d9673 100644 --- a/chrome/browser/importer/toolbar_importer.cc +++ b/chrome/browser/importer/toolbar_importer.cc @@ -102,7 +102,7 @@ void Toolbar5Importer::Cancel() { } } -void Toolbar5Importer::OnURLFetchComplete(const content::URLFetcher* source) { +void Toolbar5Importer::OnURLFetchComplete(const net::URLFetcher* source) { if (cancelled()) { EndImport(); return; diff --git a/chrome/browser/importer/toolbar_importer.h b/chrome/browser/importer/toolbar_importer.h index 2e8ddb1..6ca3a0c 100644 --- a/chrome/browser/importer/toolbar_importer.h +++ b/chrome/browser/importer/toolbar_importer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -49,7 +49,7 @@ class Toolbar5Importer : public content::URLFetcherDelegate, public Importer { virtual void Cancel() OVERRIDE; // content::URLFetcherDelegate method called back from the URLFetcher object. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; private: FRIEND_TEST_ALL_PREFIXES(Toolbar5ImporterTest, BookmarkParse); diff --git a/chrome/browser/intents/cws_intents_registry.cc b/chrome/browser/intents/cws_intents_registry.cc index fd00f1b..1d0fae2 100644 --- a/chrome/browser/intents/cws_intents_registry.cc +++ b/chrome/browser/intents/cws_intents_registry.cc @@ -61,7 +61,7 @@ CWSIntentsRegistry::~CWSIntentsRegistry() { STLDeleteValues(&queries_); } -void CWSIntentsRegistry::OnURLFetchComplete(const content::URLFetcher* source) { +void CWSIntentsRegistry::OnURLFetchComplete(const net::URLFetcher* source) { DCHECK(source); URLFetcherHandle handle = reinterpret_cast<URLFetcherHandle>(source); diff --git a/chrome/browser/intents/cws_intents_registry.h b/chrome/browser/intents/cws_intents_registry.h index ec01eb7..caf3649 100644 --- a/chrome/browser/intents/cws_intents_registry.h +++ b/chrome/browser/intents/cws_intents_registry.h @@ -73,7 +73,7 @@ class CWSIntentsRegistry : public ProfileKeyedService, virtual ~CWSIntentsRegistry(); // content::URLFetcherDelegate implementation. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // Map for all in-flight web data requests/intent queries. QueryMap queries_; diff --git a/chrome/browser/intranet_redirect_detector.cc b/chrome/browser/intranet_redirect_detector.cc index 019aa07..3dcc5be 100644 --- a/chrome/browser/intranet_redirect_detector.cc +++ b/chrome/browser/intranet_redirect_detector.cc @@ -94,12 +94,12 @@ void IntranetRedirectDetector::FinishSleep() { } void IntranetRedirectDetector::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { // Delete the fetcher on this function's exit. Fetchers::iterator fetcher = fetchers_.find( - const_cast<content::URLFetcher*>(source)); + const_cast<net::URLFetcher*>(source)); DCHECK(fetcher != fetchers_.end()); - scoped_ptr<content::URLFetcher> clean_up_fetcher(*fetcher); + scoped_ptr<net::URLFetcher> clean_up_fetcher(*fetcher); fetchers_.erase(fetcher); // If any two fetches result in the same domain/host, we set the redirect diff --git a/chrome/browser/intranet_redirect_detector.h b/chrome/browser/intranet_redirect_detector.h index 0f59d99..5f14c67 100644 --- a/chrome/browser/intranet_redirect_detector.h +++ b/chrome/browser/intranet_redirect_detector.h @@ -11,9 +11,9 @@ #include <vector> #include "base/memory/weak_ptr.h" -#include "content/public/common/url_fetcher_delegate.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" +#include "content/public/common/url_fetcher_delegate.h" #include "googleurl/src/gurl.h" #include "net/base/host_resolver_proc.h" #include "net/base/network_change_notifier.h" @@ -60,14 +60,14 @@ class IntranetRedirectDetector static const size_t kNumCharsInHostnames; private: - typedef std::set<content::URLFetcher*> Fetchers; + typedef std::set<net::URLFetcher*> Fetchers; // Called when the seven second startup sleep or the one second network // switch sleep has finished. Runs any pending fetch. void FinishSleep(); // content::URLFetcherDelegate - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // NetworkChangeNotifier::IPAddressObserver virtual void OnIPAddressChanged() OVERRIDE; diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc index 6df2c16..a904390a 100644 --- a/chrome/browser/metrics/metrics_service.cc +++ b/chrome/browser/metrics/metrics_service.cc @@ -1195,7 +1195,7 @@ static const char* StatusToString(const net::URLRequestStatus& status) { // lose protobuf uploads when XML ones succeed; but we will never duplicate any // protobuf uploads. Protobuf failures should be rare enough to where this // should be ok while we have the two pipelines running in parallel. -void MetricsService::OnURLFetchComplete(const content::URLFetcher* source) { +void MetricsService::OnURLFetchComplete(const net::URLFetcher* source) { DCHECK(waiting_for_asynchronus_reporting_step_); // We're not allowed to re-use the existing |URLFetcher|s, so free them here. diff --git a/chrome/browser/metrics/metrics_service.h b/chrome/browser/metrics/metrics_service.h index cfe1943..00966e7 100644 --- a/chrome/browser/metrics/metrics_service.h +++ b/chrome/browser/metrics/metrics_service.h @@ -261,7 +261,7 @@ class MetricsService // Implementation of content::URLFetcherDelegate. Called after transmission // completes (either successfully or with failure). - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // Logs debugging details, for the case where the server returns a response // code other than 200. diff --git a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc index fa69265..22a284f 100644 --- a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc +++ b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc @@ -661,7 +661,7 @@ void GaiaOAuthFetcher::OnUserInfoFetched( } } -void GaiaOAuthFetcher::OnURLFetchComplete(const content::URLFetcher* source) { +void GaiaOAuthFetcher::OnURLFetchComplete(const net::URLFetcher* source) { // Keep |fetcher_| around to avoid invalidating its |status| (accessed below). scoped_ptr<content::URLFetcher> current_fetcher(fetcher_.release()); fetch_pending_ = false; diff --git a/chrome/browser/net/gaia/gaia_oauth_fetcher.h b/chrome/browser/net/gaia/gaia_oauth_fetcher.h index 0b1c36a..5c57df5 100644 --- a/chrome/browser/net/gaia/gaia_oauth_fetcher.h +++ b/chrome/browser/net/gaia/gaia_oauth_fetcher.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -136,7 +136,7 @@ class GaiaOAuthFetcher : public content::URLFetcherDelegate, bool detail); // Implementation of content::URLFetcherDelegate - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // StartGetOAuthToken (or other Start* routine) been called, but results // are not back yet. diff --git a/chrome/browser/net/sdch_dictionary_fetcher.cc b/chrome/browser/net/sdch_dictionary_fetcher.cc index 4cd1b5d..67baab0 100644 --- a/chrome/browser/net/sdch_dictionary_fetcher.cc +++ b/chrome/browser/net/sdch_dictionary_fetcher.cc @@ -76,7 +76,7 @@ void SdchDictionaryFetcher::StartFetching() { } void SdchDictionaryFetcher::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { if ((200 == source->GetResponseCode()) && (source->GetStatus().status() == net::URLRequestStatus::SUCCESS)) { std::string data; diff --git a/chrome/browser/net/sdch_dictionary_fetcher.h b/chrome/browser/net/sdch_dictionary_fetcher.h index 4476557..8deb288 100644 --- a/chrome/browser/net/sdch_dictionary_fetcher.h +++ b/chrome/browser/net/sdch_dictionary_fetcher.h @@ -57,7 +57,7 @@ class SdchDictionaryFetcher // Implementation of content::URLFetcherDelegate. Called after transmission // completes (either successfully or with failure). - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // A queue of URLs that are being used to download dictionaries. std::queue<GURL> fetch_queue_; diff --git a/chrome/browser/policy/device_management_service.cc b/chrome/browser/policy/device_management_service.cc index 3e15e96..edaeb68 100644 --- a/chrome/browser/policy/device_management_service.cc +++ b/chrome/browser/policy/device_management_service.cc @@ -93,7 +93,7 @@ bool IsProxyError(const net::URLRequestStatus status) { return false; } -bool IsProtobufMimeType(const content::URLFetcher* source) { +bool IsProtobufMimeType(const net::URLFetcher* source) { return source->GetResponseHeaders()->HasHeaderValue( "content-type", "application/x-protobuffer"); } @@ -523,7 +523,7 @@ void DeviceManagementService::StartJob(DeviceManagementRequestJobImpl* job, } void DeviceManagementService::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { JobFetcherMap::iterator entry(pending_jobs_.find(source)); if (entry == pending_jobs_.end()) { NOTREACHED() << "Callback from foreign URL fetcher"; diff --git a/chrome/browser/policy/device_management_service.h b/chrome/browser/policy/device_management_service.h index 0b77b8a..112e4b1 100644 --- a/chrome/browser/policy/device_management_service.h +++ b/chrome/browser/policy/device_management_service.h @@ -104,14 +104,14 @@ class DeviceManagementService : public content::URLFetcherDelegate { void Shutdown(); private: - typedef std::map<const content::URLFetcher*, + typedef std::map<const net::URLFetcher*, DeviceManagementRequestJobImpl*> JobFetcherMap; typedef std::deque<DeviceManagementRequestJobImpl*> JobQueue; friend class DeviceManagementRequestJobImpl; // content::URLFetcherDelegate override. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // Does the actual initialization using the request context specified for // |PrepareInitialization|. This will also fire any pending network requests. diff --git a/chrome/browser/profiles/profile_downloader.cc b/chrome/browser/profiles/profile_downloader.cc index 179a3ce..cc7079f 100644 --- a/chrome/browser/profiles/profile_downloader.cc +++ b/chrome/browser/profiles/profile_downloader.cc @@ -275,7 +275,7 @@ void ProfileDownloader::StartFetchingOAuth2AccessToken() { ProfileDownloader::~ProfileDownloader() {} -void ProfileDownloader::OnURLFetchComplete(const content::URLFetcher* source) { +void ProfileDownloader::OnURLFetchComplete(const net::URLFetcher* source) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); std::string data; source->GetResponseAsString(&data); diff --git a/chrome/browser/profiles/profile_downloader.h b/chrome/browser/profiles/profile_downloader.h index 0395ab4..42f973f 100644 --- a/chrome/browser/profiles/profile_downloader.h +++ b/chrome/browser/profiles/profile_downloader.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -13,12 +13,12 @@ #include "base/memory/scoped_ptr.h" #include "base/string16.h" #include "chrome/browser/image_decoder.h" +#include "chrome/common/net/gaia/oauth2_access_token_consumer.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/common/url_fetcher_delegate.h" #include "googleurl/src/gurl.h" #include "third_party/skia/include/core/SkBitmap.h" -#include "chrome/common/net/gaia/oauth2_access_token_consumer.h" class ProfileDownloaderDelegate; class OAuth2AccessTokenFetcher; @@ -68,7 +68,7 @@ class ProfileDownloader : public content::URLFetcherDelegate, FRIEND_TEST_ALL_PREFIXES(ProfileDownloaderTest, DefaultURL); // Overriden from content::URLFetcherDelegate: - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // Overriden from ImageDecoder::Delegate: virtual void OnImageDecoded(const ImageDecoder* decoder, diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chrome/browser/safe_browsing/client_side_detection_service.cc index d176ee5..a272443 100644 --- a/chrome/browser/safe_browsing/client_side_detection_service.cc +++ b/chrome/browser/safe_browsing/client_side_detection_service.cc @@ -108,7 +108,7 @@ void ClientSideDetectionService::SetEnabledAndRefreshState(bool enabled) { // Cancel pending requests. model_fetcher_.reset(); // Invoke pending callbacks with a false verdict. - for (std::map<const content::URLFetcher*, ClientReportInfo*>::iterator it = + for (std::map<const net::URLFetcher*, ClientReportInfo*>::iterator it = client_phishing_reports_.begin(); it != client_phishing_reports_.end(); ++it) { ClientReportInfo* info = it->second; @@ -181,7 +181,7 @@ bool ClientSideDetectionService::IsBadIpAddress( } void ClientSideDetectionService::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { std::string data; source->GetResponseAsString(&data); if (source == model_fetcher_.get()) { @@ -322,7 +322,7 @@ void ClientSideDetectionService::StartClientReportPhishingRequest( } void ClientSideDetectionService::HandleModelResponse( - const content::URLFetcher* source, + const net::URLFetcher* source, const GURL& url, const net::URLRequestStatus& status, int response_code, @@ -363,7 +363,7 @@ void ClientSideDetectionService::HandleModelResponse( } void ClientSideDetectionService::HandlePhishingVerdict( - const content::URLFetcher* source, + const net::URLFetcher* source, const GURL& url, const net::URLRequestStatus& status, int response_code, diff --git a/chrome/browser/safe_browsing/client_side_detection_service.h b/chrome/browser/safe_browsing/client_side_detection_service.h index 19fd6aa..26483ee 100644 --- a/chrome/browser/safe_browsing/client_side_detection_service.h +++ b/chrome/browser/safe_browsing/client_side_detection_service.h @@ -29,9 +29,9 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/time.h" -#include "content/public/common/url_fetcher_delegate.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" +#include "content/public/common/url_fetcher_delegate.h" #include "googleurl/src/gurl.h" #include "net/base/net_util.h" @@ -84,7 +84,7 @@ class ClientSideDetectionService : public content::URLFetcherDelegate, } // From the content::URLFetcherDelegate interface. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // content::NotificationObserver overrides: virtual void Observe(int type, @@ -208,7 +208,7 @@ class ClientSideDetectionService : public content::URLFetcherDelegate, // Called by OnURLFetchComplete to handle the response from fetching the // model. - void HandleModelResponse(const content::URLFetcher* source, + void HandleModelResponse(const net::URLFetcher* source, const GURL& url, const net::URLRequestStatus& status, int response_code, @@ -217,7 +217,7 @@ class ClientSideDetectionService : public content::URLFetcherDelegate, // Called by OnURLFetchComplete to handle the server response from // sending the client-side phishing request. - void HandlePhishingVerdict(const content::URLFetcher* source, + void HandlePhishingVerdict(const net::URLFetcher* source, const GURL& url, const net::URLRequestStatus& status, int response_code, @@ -263,7 +263,7 @@ class ClientSideDetectionService : public content::URLFetcherDelegate, // Map of client report phishing request to the corresponding callback that // has to be invoked when the request is done. struct ClientReportInfo; - std::map<const content::URLFetcher*, ClientReportInfo*> + std::map<const net::URLFetcher*, ClientReportInfo*> client_phishing_reports_; // Cache of completed requests. Used to satisfy requests for the same urls diff --git a/chrome/browser/safe_browsing/download_protection_service.cc b/chrome/browser/safe_browsing/download_protection_service.cc index 797ee20..4217a21 100644 --- a/chrome/browser/safe_browsing/download_protection_service.cc +++ b/chrome/browser/safe_browsing/download_protection_service.cc @@ -395,7 +395,7 @@ class DownloadProtectionService::CheckClientDownloadRequest } // From the content::URLFetcherDelegate interface. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE { + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK_EQ(source, fetcher_.get()); VLOG(2) << "Received a response for URL: " diff --git a/chrome/browser/safe_browsing/malware_details_cache.cc b/chrome/browser/safe_browsing/malware_details_cache.cc index 43b2b86..1914786a 100644 --- a/chrome/browser/safe_browsing/malware_details_cache.cc +++ b/chrome/browser/safe_browsing/malware_details_cache.cc @@ -102,7 +102,7 @@ ClientMalwareReportRequest::Resource* MalwareDetailsCacheCollector::GetResource( } void MalwareDetailsCacheCollector::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { DVLOG(1) << "OnUrlFetchComplete"; DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); DCHECK(current_fetch_.get()); @@ -141,7 +141,7 @@ void MalwareDetailsCacheCollector::OnURLFetchComplete( void MalwareDetailsCacheCollector::ReadResponse( ClientMalwareReportRequest::Resource* pb_resource, - const content::URLFetcher* source) { + const net::URLFetcher* source) { DVLOG(1) << "ReadResponse"; DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); net::HttpResponseHeaders* headers = source->GetResponseHeaders(); diff --git a/chrome/browser/safe_browsing/malware_details_cache.h b/chrome/browser/safe_browsing/malware_details_cache.h index 7bf8f9c..eaaa3c5 100644 --- a/chrome/browser/safe_browsing/malware_details_cache.h +++ b/chrome/browser/safe_browsing/malware_details_cache.h @@ -54,7 +54,7 @@ class MalwareDetailsCacheCollector protected: // Implementation of URLFetcher::Delegate. Called after the request // completes (either successfully or with failure). - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; private: friend class base::RefCountedThreadSafe<MalwareDetailsCacheCollector>; @@ -94,7 +94,7 @@ class MalwareDetailsCacheCollector // Read the HTTP response from |source| and add it to |pb_resource|. void ReadResponse( safe_browsing::ClientMalwareReportRequest::Resource* pb_resource, - const content::URLFetcher* source); + const net::URLFetcher* source); // Read the body |data| and add it to |pb_resource|. void ReadData( diff --git a/chrome/browser/safe_browsing/protocol_manager.cc b/chrome/browser/safe_browsing/protocol_manager.cc index bd01a23..2773dd4 100644 --- a/chrome/browser/safe_browsing/protocol_manager.cc +++ b/chrome/browser/safe_browsing/protocol_manager.cc @@ -183,17 +183,17 @@ void SafeBrowsingProtocolManager::GetNextUpdate() { // do will report all the chunks we have. If that chunk is still // required, the SafeBrowsing servers will tell us to get it again. void SafeBrowsingProtocolManager::OnURLFetchComplete( - const content::URLFetcher* source) { - scoped_ptr<const content::URLFetcher> fetcher; + const net::URLFetcher* source) { + scoped_ptr<const net::URLFetcher> fetcher; bool parsed_ok = true; bool must_back_off = false; // Reduce SafeBrowsing service query frequency. // See if this is a safebrowsing report fetcher. We don't take any action for // the response to those. - std::set<const content::URLFetcher*>::iterator sit = + std::set<const net::URLFetcher*>::iterator sit = safebrowsing_reports_.find(source); if (sit != safebrowsing_reports_.end()) { - const content::URLFetcher* report = *sit; + const net::URLFetcher* report = *sit; safebrowsing_reports_.erase(sit); delete report; return; diff --git a/chrome/browser/safe_browsing/protocol_manager.h b/chrome/browser/safe_browsing/protocol_manager.h index df7a90d..8c8c83c 100644 --- a/chrome/browser/safe_browsing/protocol_manager.h +++ b/chrome/browser/safe_browsing/protocol_manager.h @@ -32,8 +32,8 @@ // specifying this). namespace __gnu_cxx { template<> -struct hash<const content::URLFetcher*> { - size_t operator()(const content::URLFetcher* fetcher) const { +struct hash<const net::URLFetcher*> { + size_t operator()(const net::URLFetcher* fetcher) const { return reinterpret_cast<size_t>(fetcher); } }; @@ -92,7 +92,7 @@ class SafeBrowsingProtocolManager : public content::URLFetcherDelegate { virtual void Initialize(); // content::URLFetcherDelegate interface. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // API used by the SafeBrowsingService for issuing queries. When the results // are available, SafeBrowsingService::HandleGetHashResults is called. @@ -310,7 +310,7 @@ class SafeBrowsingProtocolManager : public content::URLFetcherDelegate { std::deque<ChunkUrl> chunk_request_urls_; // Map of GetHash requests. - typedef base::hash_map<const content::URLFetcher*, + typedef base::hash_map<const net::URLFetcher*, SafeBrowsingService::SafeBrowsingCheck*> HashRequests; HashRequests hash_requests_; @@ -343,7 +343,7 @@ class SafeBrowsingProtocolManager : public content::URLFetcherDelegate { // Track outstanding SafeBrowsing report fetchers for clean up. // We add both "hit" and "detail" fetchers in this set. - std::set<const content::URLFetcher*> safebrowsing_reports_; + std::set<const net::URLFetcher*> safebrowsing_reports_; // The safe browsing client name sent in each request. std::string client_name_; diff --git a/chrome/browser/safe_browsing/safe_browsing_test.cc b/chrome/browser/safe_browsing/safe_browsing_test.cc index 7b2d7c3..33a8b6d 100644 --- a/chrome/browser/safe_browsing/safe_browsing_test.cc +++ b/chrome/browser/safe_browsing/safe_browsing_test.cc @@ -505,7 +505,7 @@ class SafeBrowsingServiceTestHelper } // Callback for URLFetcher. - virtual void OnURLFetchComplete(const content::URLFetcher* source) { + virtual void OnURLFetchComplete(const net::URLFetcher* source) { source->GetResponseAsString(&response_data_); response_status_ = source->GetStatus().status(); StopUILoop(); diff --git a/chrome/browser/search_engines/template_url_fetcher.cc b/chrome/browser/search_engines/template_url_fetcher.cc index fade852..c3c3e52 100644 --- a/chrome/browser/search_engines/template_url_fetcher.cc +++ b/chrome/browser/search_engines/template_url_fetcher.cc @@ -11,9 +11,9 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/search_engines/template_url.h" #include "chrome/browser/search_engines/template_url_fetcher_callbacks.h" +#include "chrome/browser/search_engines/template_url_parser.h" #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/search_engines/template_url_service_factory.h" -#include "chrome/browser/search_engines/template_url_parser.h" #include "chrome/common/chrome_notification_types.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" @@ -48,7 +48,7 @@ class TemplateURLFetcher::RequestDelegate // content::URLFetcherDelegate: // If data contains a valid OSDD, a TemplateURL is created and added to // the TemplateURLService. - virtual void OnURLFetchComplete(const content::URLFetcher* source); + virtual void OnURLFetchComplete(const net::URLFetcher* source); // URL of the OSDD. GURL url() const { return osdd_url_; } @@ -130,7 +130,7 @@ void TemplateURLFetcher::RequestDelegate::Observe( } void TemplateURLFetcher::RequestDelegate::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { // Validation checks. // Make sure we can still replace the keyword, i.e. the fetch was successful. // If the OSDD file was loaded HTTP, we also have to check the response_code. diff --git a/chrome/browser/spellchecker/spellcheck_host_impl.cc b/chrome/browser/spellchecker/spellcheck_host_impl.cc index b468fef..a2b7d8f 100644 --- a/chrome/browser/spellchecker/spellcheck_host_impl.cc +++ b/chrome/browser/spellchecker/spellcheck_host_impl.cc @@ -321,7 +321,7 @@ void SpellCheckHostImpl::WriteWordToCustomDictionary(const std::string& word) { profile_->WriteWordToCustomDictionary(word); } -void SpellCheckHostImpl::OnURLFetchComplete(const content::URLFetcher* source) { +void SpellCheckHostImpl::OnURLFetchComplete(const net::URLFetcher* source) { DCHECK(source); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); scoped_ptr<content::URLFetcher> fetcher_destructor(fetcher_.release()); diff --git a/chrome/browser/spellchecker/spellcheck_host_impl.h b/chrome/browser/spellchecker/spellcheck_host_impl.h index d3089d0..a7c4fe8 100644 --- a/chrome/browser/spellchecker/spellcheck_host_impl.h +++ b/chrome/browser/spellchecker/spellcheck_host_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -16,9 +16,9 @@ #include "base/message_loop_helpers.h" #include "chrome/browser/spellchecker/spellcheck_host.h" #include "chrome/browser/spellchecker/spellcheck_profile_provider.h" -#include "content/public/common/url_fetcher_delegate.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" +#include "content/public/common/url_fetcher_delegate.h" // This class implements the SpellCheckHost interface to provide the // functionalities listed below: @@ -109,7 +109,7 @@ class SpellCheckHostImpl : public SpellCheckHost, // content::URLFetcherDelegate implementation. Called when we finish // downloading the spellcheck dictionary; saves the dictionary to |data_|. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // NotificationProfile implementation. virtual void Observe(int type, diff --git a/chrome/browser/spellchecker/spelling_service_client.cc b/chrome/browser/spellchecker/spelling_service_client.cc index 0dee177..b399248 100644 --- a/chrome/browser/spellchecker/spelling_service_client.cc +++ b/chrome/browser/spellchecker/spelling_service_client.cc @@ -109,7 +109,7 @@ bool SpellingServiceClient::RequestTextCheck( } void SpellingServiceClient::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { scoped_ptr<content::URLFetcher> clean_up_fetcher(fetcher_.release()); bool success = false; std::vector<SpellCheckResult> results; diff --git a/chrome/browser/spellchecker/spelling_service_client.h b/chrome/browser/spellchecker/spelling_service_client.h index 279ae98..a4ece9d 100644 --- a/chrome/browser/spellchecker/spelling_service_client.h +++ b/chrome/browser/spellchecker/spelling_service_client.h @@ -72,7 +72,7 @@ class SpellingServiceClient : public content::URLFetcherDelegate { virtual ~SpellingServiceClient(); // content::URLFetcherDelegate implementation. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // Sends a text-check request to the Spelling service. When we send a request // to the Spelling service successfully, this function returns true. (This diff --git a/chrome/browser/sync/glue/http_bridge.cc b/chrome/browser/sync/glue/http_bridge.cc index e7a217f..ebf08e5 100644 --- a/chrome/browser/sync/glue/http_bridge.cc +++ b/chrome/browser/sync/glue/http_bridge.cc @@ -281,7 +281,7 @@ void HttpBridge::DestroyURLFetcherOnIOThread(content::URLFetcher* fetcher) { delete fetcher; } -void HttpBridge::OnURLFetchComplete(const content::URLFetcher *source) { +void HttpBridge::OnURLFetchComplete(const net::URLFetcher* source) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); base::AutoLock lock(fetch_state_lock_); if (fetch_state_.aborted) diff --git a/chrome/browser/sync/glue/http_bridge.h b/chrome/browser/sync/glue/http_bridge.h index a26410d..2131440 100644 --- a/chrome/browser/sync/glue/http_bridge.h +++ b/chrome/browser/sync/glue/http_bridge.h @@ -123,7 +123,7 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, const std::string& name) const OVERRIDE; // content::URLFetcherDelegate implementation. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; #if defined(UNIT_TEST) net::URLRequestContextGetter* GetRequestContextGetter() const { diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc index 5467cff..d2bae7d 100644 --- a/chrome/browser/sync/test/integration/sync_test.cc +++ b/chrome/browser/sync/test/integration/sync_test.cc @@ -84,7 +84,7 @@ class SyncServerStatusChecker : public content::URLFetcherDelegate { public: SyncServerStatusChecker() : running_(false) {} - virtual void OnURLFetchComplete(const content::URLFetcher* source) { + virtual void OnURLFetchComplete(const net::URLFetcher* source) { std::string data; source->GetResponseAsString(&data); running_ = diff --git a/chrome/browser/tab_contents/render_view_context_menu.h b/chrome/browser/tab_contents/render_view_context_menu.h index 8eb10d7..94a6441 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.h +++ b/chrome/browser/tab_contents/render_view_context_menu.h @@ -60,7 +60,7 @@ struct WebPluginAction; // } // virtual ~MyTask() { // } -// virtual void OnURLFetchComplete(const content::URLFetcher* source, +// virtual void OnURLFetchComplete(const net::URLFetcher* source, // const GURL& url, // const net::URLRequestStatus& status, // int response, diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc index eea35c5..76e2de8 100644 --- a/chrome/browser/translate/translate_manager.cc +++ b/chrome/browser/translate/translate_manager.cc @@ -11,9 +11,9 @@ #include "base/memory/singleton.h" #include "base/message_loop.h" #include "base/metrics/histogram.h" -#include "base/stringprintf.h" #include "base/string_split.h" #include "base/string_util.h" +#include "base/stringprintf.h" #include "base/values.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/infobars/infobar_tab_helper.h" @@ -410,12 +410,12 @@ void TranslateManager::Observe(int type, } } -void TranslateManager::OnURLFetchComplete(const content::URLFetcher* source) { +void TranslateManager::OnURLFetchComplete(const net::URLFetcher* source) { if (translate_script_request_pending_.get() != source && language_list_request_pending_.get() != source) { // Looks like crash on Mac is possibly caused with callback entering here // with unknown fetcher when network is refreshed. - scoped_ptr<const content::URLFetcher> delete_ptr(source); + scoped_ptr<const net::URLFetcher> delete_ptr(source); return; } diff --git a/chrome/browser/translate/translate_manager.h b/chrome/browser/translate/translate_manager.h index 5646795..3ee3c83 100644 --- a/chrome/browser/translate/translate_manager.h +++ b/chrome/browser/translate/translate_manager.h @@ -18,9 +18,9 @@ #include "base/time.h" #include "chrome/browser/prefs/pref_change_registrar.h" #include "chrome/common/translate_errors.h" -#include "content/public/common/url_fetcher_delegate.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" +#include "content/public/common/url_fetcher_delegate.h" template <typename T> struct DefaultSingletonTraits; class GURL; @@ -80,7 +80,7 @@ class TranslateManager : public content::NotificationObserver, const content::NotificationDetails& details) OVERRIDE; // content::URLFetcherDelegate implementation: - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // Used by unit-tests to override the default delay after which the translate // script is fetched again from the translation server. diff --git a/chrome/browser/ui/intents/web_intent_picker_controller.cc b/chrome/browser/ui/intents/web_intent_picker_controller.cc index daa7ace..570d605 100644 --- a/chrome/browser/ui/intents/web_intent_picker_controller.cc +++ b/chrome/browser/ui/intents/web_intent_picker_controller.cc @@ -12,9 +12,9 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/extensions/webstore_installer.h" #include "chrome/browser/favicon/favicon_service.h" +#include "chrome/browser/intents/cws_intents_registry_factory.h" #include "chrome/browser/intents/default_web_intent_service.h" #include "chrome/browser/intents/web_intents_registry_factory.h" -#include "chrome/browser/intents/cws_intents_registry_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_util.h" #include "chrome/browser/tabs/tab_strip_model.h" @@ -101,14 +101,14 @@ string16 GetIntentActionString(const std::string& action) { // Self-deleting trampoline that forwards A URLFetcher response to a callback. class URLFetcherTrampoline : public content::URLFetcherDelegate { public: - typedef base::Callback<void(const content::URLFetcher* source)> + typedef base::Callback<void(const net::URLFetcher* source)> ForwardingCallback; explicit URLFetcherTrampoline(const ForwardingCallback& callback); ~URLFetcherTrampoline(); // content::URLFetcherDelegate implementation. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; private: // Fowarding callback from |OnURLFetchComplete|. @@ -123,7 +123,7 @@ URLFetcherTrampoline::~URLFetcherTrampoline() { } void URLFetcherTrampoline::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { DCHECK(!callback_.is_null()); callback_.Run(source); delete source; @@ -575,7 +575,7 @@ void WebIntentPickerController::OnCWSIntentServicesAvailable( } void WebIntentPickerController::OnExtensionIconURLFetchComplete( - const string16& extension_id, const content::URLFetcher* source) { + const string16& extension_id, const net::URLFetcher* source) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); if (source->GetResponseCode() != 200) { AsyncOperationFinished(); diff --git a/chrome/browser/ui/intents/web_intent_picker_controller.h b/chrome/browser/ui/intents/web_intent_picker_controller.h index 0c92953..6ab7261 100644 --- a/chrome/browser/ui/intents/web_intent_picker_controller.h +++ b/chrome/browser/ui/intents/web_intent_picker_controller.h @@ -15,8 +15,8 @@ #include "base/string16.h" #include "chrome/browser/extensions/webstore_installer.h" #include "chrome/browser/favicon/favicon_service.h" -#include "chrome/browser/intents/web_intents_registry.h" #include "chrome/browser/intents/cws_intents_registry.h" +#include "chrome/browser/intents/web_intents_registry.h" #include "chrome/browser/ui/intents/web_intent_picker_delegate.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" @@ -132,7 +132,7 @@ class WebIntentPickerController : public content::NotificationObserver, // Called when a suggested extension's icon is fetched. void OnExtensionIconURLFetchComplete(const string16& extension_id, - const content::URLFetcher* source); + const net::URLFetcher* source); typedef base::Callback<void(const gfx::Image&)> ExtensionIconAvailableCallback; diff --git a/chrome/browser/ui/webui/ntp/suggestions_source_discovery.cc b/chrome/browser/ui/webui/ntp/suggestions_source_discovery.cc index c97e518..2de116c 100644 --- a/chrome/browser/ui/webui/ntp/suggestions_source_discovery.cc +++ b/chrome/browser/ui/webui/ntp/suggestions_source_discovery.cc @@ -82,7 +82,7 @@ void SuggestionsSourceDiscovery::SetCombiner(SuggestionsCombiner* combiner) { } void SuggestionsSourceDiscovery::OnURLFetchComplete( - const content::URLFetcher* source) { + const net::URLFetcher* source) { DCHECK(combiner_); STLDeleteElements(&items_); if (source->GetStatus().status() == net::URLRequestStatus::SUCCESS && diff --git a/chrome/browser/ui/webui/ntp/suggestions_source_discovery.h b/chrome/browser/ui/webui/ntp/suggestions_source_discovery.h index f1e934e..ac7ae9b 100644 --- a/chrome/browser/ui/webui/ntp/suggestions_source_discovery.h +++ b/chrome/browser/ui/webui/ntp/suggestions_source_discovery.h @@ -29,7 +29,7 @@ class SuggestionsSourceDiscovery : public SuggestionsSource, virtual ~SuggestionsSourceDiscovery(); // content::URLFetcherDelegate override and implementation. - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; protected: // SuggestionsSource overrides: diff --git a/chrome/browser/web_resource/web_resource_service.cc b/chrome/browser/web_resource/web_resource_service.cc index 657b092..484ec0c 100644 --- a/chrome/browser/web_resource/web_resource_service.cc +++ b/chrome/browser/web_resource/web_resource_service.cc @@ -220,7 +220,7 @@ void WebResourceService::StartFetch() { url_fetcher_->Start(); } -void WebResourceService::OnURLFetchComplete(const content::URLFetcher* source) { +void WebResourceService::OnURLFetchComplete(const net::URLFetcher* source) { // Delete the URLFetcher when this function exits. scoped_ptr<content::URLFetcher> clean_up_fetcher(url_fetcher_.release()); diff --git a/chrome/browser/web_resource/web_resource_service.h b/chrome/browser/web_resource/web_resource_service.h index a4ab9e7..02e88e6 100644 --- a/chrome/browser/web_resource/web_resource_service.h +++ b/chrome/browser/web_resource/web_resource_service.h @@ -51,7 +51,7 @@ class WebResourceService friend class base::RefCountedThreadSafe<WebResourceService>; // content::URLFetcherDelegate implementation: - virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; // Schedules a fetch after |delay_ms| milliseconds. void ScheduleFetch(int64 delay_ms); |