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

Side by Side Diff: chrome/browser/ui/webui/ntp/suggestions_source_discovery.cc

Issue 10412050: Change most content::URLFetcher references to net::URLFetcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ChromeOS, address comments Created 8 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/ntp/suggestions_source_discovery.h" 5 #include "chrome/browser/ui/webui/ntp/suggestions_source_discovery.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 void SuggestionsSourceDiscovery::FetchItems(Profile* profile) { 62 void SuggestionsSourceDiscovery::FetchItems(Profile* profile) {
63 DCHECK(combiner_); 63 DCHECK(combiner_);
64 64
65 // If a fetch is already in progress, we don't have to start a new one. 65 // If a fetch is already in progress, we don't have to start a new one.
66 if (recommended_fetcher_ != NULL) 66 if (recommended_fetcher_ != NULL)
67 return; 67 return;
68 68
69 // TODO(beaudoin): Extract the URL to some preference. Use a better service. 69 // TODO(beaudoin): Extract the URL to some preference. Use a better service.
70 recommended_fetcher_.reset(content::URLFetcher::Create( 70 recommended_fetcher_.reset(content::URLFetcher::Create(
71 GURL(kDiscoveryBackendURL), content::URLFetcher::GET, this)); 71 GURL(kDiscoveryBackendURL), net::URLFetcher::GET, this));
72 recommended_fetcher_->SetRequestContext( 72 recommended_fetcher_->SetRequestContext(
73 g_browser_process->system_request_context()); 73 g_browser_process->system_request_context());
74 recommended_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES | 74 recommended_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
75 net::LOAD_DO_NOT_SAVE_COOKIES); 75 net::LOAD_DO_NOT_SAVE_COOKIES);
76 recommended_fetcher_->Start(); 76 recommended_fetcher_->Start();
77 } 77 }
78 78
79 void SuggestionsSourceDiscovery::SetCombiner(SuggestionsCombiner* combiner) { 79 void SuggestionsSourceDiscovery::SetCombiner(SuggestionsCombiner* combiner) {
80 DCHECK(!combiner_); 80 DCHECK(!combiner_);
81 combiner_ = combiner; 81 combiner_ = combiner;
(...skipping 30 matching lines...) Expand all
112 unescaped_url, 112 unescaped_url,
113 GURL(unescaped_url)); 113 GURL(unescaped_url));
114 items_.push_back(page_value); 114 items_.push_back(page_value);
115 } 115 }
116 } 116 }
117 } 117 }
118 118
119 recommended_fetcher_.reset(); 119 recommended_fetcher_.reset();
120 combiner_->OnItemsReady(); 120 combiner_->OnItemsReady();
121 } 121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698