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

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

Issue 8416020: Handle additional feedback from http://codereview.chromium.org/8395038/. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "content/public/common/url_fetcher.h" 10 #include "content/public/common/url_fetcher.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 current_fetch_->SetRequestContext(context); 71 current_fetch_->SetRequestContext(context);
72 current_fetch_->Start(); 72 current_fetch_->Start();
73 } 73 }
74 74
75 void SdchDictionaryFetcher::OnURLFetchComplete( 75 void SdchDictionaryFetcher::OnURLFetchComplete(
76 const content::URLFetcher* source) { 76 const content::URLFetcher* source) {
77 if ((200 == source->GetResponseCode()) && 77 if ((200 == source->GetResponseCode()) &&
78 (source->GetStatus().status() == net::URLRequestStatus::SUCCESS)) { 78 (source->GetStatus().status() == net::URLRequestStatus::SUCCESS)) {
79 std::string data; 79 std::string data;
80 source->GetResponseAsString(&data); 80 source->GetResponseAsString(&data);
81 net::SdchManager::Global()->AddSdchDictionary(data, source->GetUrl()); 81 net::SdchManager::Global()->AddSdchDictionary(data, source->GetURL());
82 } 82 }
83 current_fetch_.reset(NULL); 83 current_fetch_.reset(NULL);
84 ScheduleDelayedRun(); 84 ScheduleDelayedRun();
85 } 85 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698