| Index: chrome/browser/net/sdch_dictionary_fetcher.cc
|
| diff --git a/chrome/browser/net/sdch_dictionary_fetcher.cc b/chrome/browser/net/sdch_dictionary_fetcher.cc
|
| index 7283e8d1418d5a852722aab4b67a92ce138eb8fe..1130fe336242b5b5c666a2ae433771e1b98d3bd4 100644
|
| --- a/chrome/browser/net/sdch_dictionary_fetcher.cc
|
| +++ b/chrome/browser/net/sdch_dictionary_fetcher.cc
|
| @@ -14,22 +14,20 @@
|
| #include "net/url_request/url_request_status.h"
|
|
|
| SdchDictionaryFetcher::SdchDictionaryFetcher(
|
| + net::SdchManager* manager,
|
| net::URLRequestContextGetter* context)
|
| - : weak_factory_(this),
|
| + : manager_(manager),
|
| + weak_factory_(this),
|
| task_is_pending_(false),
|
| context_(context) {
|
| DCHECK(CalledOnValidThread());
|
| + DCHECK(manager);
|
| }
|
|
|
| SdchDictionaryFetcher::~SdchDictionaryFetcher() {
|
| DCHECK(CalledOnValidThread());
|
| }
|
|
|
| -// static
|
| -void SdchDictionaryFetcher::Shutdown() {
|
| - net::SdchManager::Shutdown();
|
| -}
|
| -
|
| void SdchDictionaryFetcher::Schedule(const GURL& dictionary_url) {
|
| DCHECK(CalledOnValidThread());
|
|
|
| @@ -62,6 +60,7 @@ void SdchDictionaryFetcher::ScheduleDelayedRun() {
|
| }
|
|
|
| void SdchDictionaryFetcher::StartFetching() {
|
| + DCHECK(CalledOnValidThread());
|
| DCHECK(task_is_pending_);
|
| task_is_pending_ = false;
|
|
|
| @@ -77,11 +76,12 @@ void SdchDictionaryFetcher::StartFetching() {
|
|
|
| void SdchDictionaryFetcher::OnURLFetchComplete(
|
| const net::URLFetcher* source) {
|
| + DCHECK(CalledOnValidThread());
|
| if ((200 == source->GetResponseCode()) &&
|
| (source->GetStatus().status() == net::URLRequestStatus::SUCCESS)) {
|
| std::string data;
|
| source->GetResponseAsString(&data);
|
| - net::SdchManager::Global()->AddSdchDictionary(data, source->GetURL());
|
| + manager_->AddSdchDictionary(data, source->GetURL());
|
| }
|
| current_fetch_.reset(NULL);
|
| ScheduleDelayedRun();
|
|
|