From 7cc6e5639982a9f912c46572dafa4a42682fbd04 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Tue, 25 Oct 2011 17:56:12 +0000 Subject: 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 --- chrome/browser/spellchecker/spellcheck_host_impl.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'chrome/browser/spellchecker/spellcheck_host_impl.cc') diff --git a/chrome/browser/spellchecker/spellcheck_host_impl.cc b/chrome/browser/spellchecker/spellcheck_host_impl.cc index 7efb6a2..5fdd915 100644 --- a/chrome/browser/spellchecker/spellcheck_host_impl.cc +++ b/chrome/browser/spellchecker/spellcheck_host_impl.cc @@ -297,7 +297,7 @@ void SpellCheckHostImpl::DownloadDictionary() { GURL url = GURL(std::string(kDownloadServerUrl) + StringToLowerASCII(bdict_file)); fetcher_.reset(new URLFetcher(url, URLFetcher::GET, this)); - fetcher_->set_request_context(request_context_getter_); + fetcher_->SetRequestContext(request_context_getter_); tried_to_download_ = true; fetcher_->Start(); request_context_getter_ = NULL; @@ -332,12 +332,12 @@ void SpellCheckHostImpl::WriteWordToCustomDictionary(const std::string& word) { profile_->WriteWordToCustomDictionary(word); } -void SpellCheckHostImpl::OnURLFetchComplete(const URLFetcher* source) { +void SpellCheckHostImpl::OnURLFetchComplete(const content::URLFetcher* source) { DCHECK(source); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - scoped_ptr fetcher_destructor(fetcher_.release()); + scoped_ptr fetcher_destructor(fetcher_.release()); - if ((source->response_code() / 100) != 2) { + if ((source->GetResponseCode() / 100) != 2) { // Initialize will not try to download the file a second time. LOG(ERROR) << "Failure to download dictionary."; InitializeOnFileThread(); -- cgit v1.1