| 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 1130fe336242b5b5c666a2ae433771e1b98d3bd4..feb3cb54cf0962c0f559ef03153aca77467e387e 100644
|
| --- a/chrome/browser/net/sdch_dictionary_fetcher.cc
|
| +++ b/chrome/browser/net/sdch_dictionary_fetcher.cc
|
| @@ -49,6 +49,16 @@ void SdchDictionaryFetcher::Schedule(const GURL& dictionary_url) {
|
| ScheduleDelayedRun();
|
| }
|
|
|
| +void SdchDictionaryFetcher::Cancel() {
|
| + DCHECK(CalledOnValidThread());
|
| +
|
| + while (!fetch_queue_.empty())
|
| + fetch_queue_.pop();
|
| + attempted_load_.clear();
|
| + weak_factory_.InvalidateWeakPtrs();
|
| + current_fetch_.reset(NULL);
|
| +}
|
| +
|
| void SdchDictionaryFetcher::ScheduleDelayedRun() {
|
| if (fetch_queue_.empty() || current_fetch_.get() || task_is_pending_)
|
| return;
|
|
|