| Index: net/url_request/sdch_dictionary_fetcher.cc
|
| diff --git a/net/base/sdch_dictionary_fetcher.cc b/net/url_request/sdch_dictionary_fetcher.cc
|
| similarity index 96%
|
| rename from net/base/sdch_dictionary_fetcher.cc
|
| rename to net/url_request/sdch_dictionary_fetcher.cc
|
| index 8d08b9a678afabacd828ee0b8efb70989362fabf..e4ad7395ad54934b33277f2976aa796930f3c425 100644
|
| --- a/net/base/sdch_dictionary_fetcher.cc
|
| +++ b/net/url_request/sdch_dictionary_fetcher.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "net/base/sdch_dictionary_fetcher.h"
|
| +#include "net/url_request/sdch_dictionary_fetcher.h"
|
|
|
| #include <stdint.h>
|
|
|
| @@ -24,15 +24,13 @@ const int kBufferSize = 4096;
|
| namespace net {
|
|
|
| SdchDictionaryFetcher::SdchDictionaryFetcher(
|
| - SdchFetcher::Delegate* consumer,
|
| - URLRequestContext* context)
|
| + URLRequestContext* context, OnDictionaryFetchedCallback callback)
|
| : next_state_(STATE_NONE),
|
| in_loop_(false),
|
| - consumer_(consumer),
|
| context_(context),
|
| + dictionary_fetched_callback_(callback),
|
| weak_factory_(this) {
|
| DCHECK(CalledOnValidThread());
|
| - DCHECK(consumer);
|
| DCHECK(context);
|
| }
|
|
|
| @@ -230,7 +228,7 @@ int SdchDictionaryFetcher::DoCompleteRequest(int rv) {
|
|
|
| // If the dictionary was successfully fetched, add it to the manager.
|
| if (rv == OK)
|
| - consumer_->AddSdchDictionary(dictionary_, current_request_->url());
|
| + dictionary_fetched_callback_.Run(dictionary_, current_request_->url());
|
|
|
| current_request_.reset();
|
| buffer_ = NULL;
|
|
|