summaryrefslogtreecommitdiffstats
path: root/chrome/browser/search_engines
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-25 17:56:12 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-25 17:56:12 +0000
commit7cc6e5639982a9f912c46572dafa4a42682fbd04 (patch)
treeaeda0f815ef8b72e5c2c154d66ab21c43dc9f9dc /chrome/browser/search_engines
parentea725b3aa4fe6ffdb15610d3a6a14d620088d878 (diff)
downloadchromium_src-7cc6e5639982a9f912c46572dafa4a42682fbd04.zip
chromium_src-7cc6e5639982a9f912c46572dafa4a42682fbd04.tar.gz
chromium_src-7cc6e5639982a9f912c46572dafa4a42682fbd04.tar.bz2
Create a content::UrlFetcher interface that lives in content/public/common and convert users to it. I have added a static create function, but will switch instantiations to use it in another change since this has grown a lot. Basically this change converts function names away from unix_hacker style, which they shouldn't have been using anyways since some are virtual, and made all of the other functions virtual.
BUG=98716 Review URL: http://codereview.chromium.org/8375039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107151 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/search_engines')
-rw-r--r--chrome/browser/search_engines/template_url_fetcher.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/search_engines/template_url_fetcher.cc b/chrome/browser/search_engines/template_url_fetcher.cc
index 7740fb1..abaed39 100644
--- a/chrome/browser/search_engines/template_url_fetcher.cc
+++ b/chrome/browser/search_engines/template_url_fetcher.cc
@@ -43,7 +43,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 URLFetcher* source);
+ virtual void OnURLFetchComplete(const content::URLFetcher* source);
// URL of the OSDD.
GURL url() const { return osdd_url_; }
@@ -99,7 +99,7 @@ TemplateURLFetcher::RequestDelegate::RequestDelegate(
model->Load();
}
- url_fetcher_.set_request_context(fetcher->profile()->GetRequestContext());
+ url_fetcher_.SetRequestContext(fetcher->profile()->GetRequestContext());
url_fetcher_.Start();
}
@@ -116,7 +116,7 @@ void TemplateURLFetcher::RequestDelegate::Observe(
}
void TemplateURLFetcher::RequestDelegate::OnURLFetchComplete(
- const URLFetcher* source) {
+ const content::URLFetcher* source) {
template_url_.reset(new TemplateURL());
// Validation checks.
@@ -126,8 +126,9 @@ void TemplateURLFetcher::RequestDelegate::OnURLFetchComplete(
// the response_code is not applicable and should be -1. Also, ensure that
// the returned information results in a valid search URL.
std::string data;
- if (!source->status().is_success() ||
- ((source->response_code() != -1) && (source->response_code() != 200)) ||
+ if (!source->GetStatus().is_success() ||
+ ((source->GetResponseCode() != -1) &&
+ (source->GetResponseCode() != 200)) ||
!source->GetResponseAsString(&data) ||
!TemplateURLParser::Parse(
reinterpret_cast<const unsigned char*>(data.c_str()),