Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: chrome/browser/net/sdch_dictionary_fetcher.cc

Issue 20378: Reduce the amount of included header files. Vast change like in "Oh God! This... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/net/sdch_dictionary_fetcher.h" 5 #include "chrome/browser/net/sdch_dictionary_fetcher.h"
6
6 #include "chrome/browser/profile.h" 7 #include "chrome/browser/profile.h"
8 #include "net/url_request/url_request_status.h"
7 9
8 void SdchDictionaryFetcher::Schedule(const GURL& dictionary_url) { 10 void SdchDictionaryFetcher::Schedule(const GURL& dictionary_url) {
9 // Avoid pushing duplicate copy onto queue. We may fetch this url again later 11 // Avoid pushing duplicate copy onto queue. We may fetch this url again later
10 // and get a different dictionary, but there is no reason to have it in the 12 // and get a different dictionary, but there is no reason to have it in the
11 // queue twice at one time. 13 // queue twice at one time.
12 if (!fetch_queue_.empty() && fetch_queue_.back() == dictionary_url) { 14 if (!fetch_queue_.empty() && fetch_queue_.back() == dictionary_url) {
13 SdchManager::SdchErrorRecovery( 15 SdchManager::SdchErrorRecovery(
14 SdchManager::DICTIONARY_ALREADY_SCHEDULED_TO_DOWNLOAD); 16 SdchManager::DICTIONARY_ALREADY_SCHEDULED_TO_DOWNLOAD);
15 return; 17 return;
16 } 18 }
(...skipping 25 matching lines...) Expand all
42 const GURL& url, 44 const GURL& url,
43 const URLRequestStatus& status, 45 const URLRequestStatus& status,
44 int response_code, 46 int response_code,
45 const ResponseCookies& cookies, 47 const ResponseCookies& cookies,
46 const std::string& data) { 48 const std::string& data) {
47 if ((200 == response_code) && (status.status() == URLRequestStatus::SUCCESS)) 49 if ((200 == response_code) && (status.status() == URLRequestStatus::SUCCESS))
48 SdchManager::Global()->AddSdchDictionary(data, url); 50 SdchManager::Global()->AddSdchDictionary(data, url);
49 current_fetch_.reset(NULL); 51 current_fetch_.reset(NULL);
50 ScheduleDelayedRun(); 52 ScheduleDelayedRun();
51 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698