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

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

Issue 10392192: Remove content::URLFetcherDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More cleanup 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"
11 #include "base/json/json_reader.h" 11 #include "base/json/json_reader.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 16 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
17 #include "chrome/browser/ui/webui/ntp/suggestions_combiner.h" 17 #include "chrome/browser/ui/webui/ntp/suggestions_combiner.h"
18 #include "content/public/common/url_fetcher.h" 18 #include "content/public/common/url_fetcher.h"
19 #include "content/public/common/url_fetcher_delegate.h"
20 #include "googleurl/src/gurl.h" 19 #include "googleurl/src/gurl.h"
21 #include "net/base/load_flags.h" 20 #include "net/base/load_flags.h"
22 #include "net/http/http_status_code.h" 21 #include "net/http/http_status_code.h"
22 #include "net/url_request/url_fetcher_delegate.h"
23 #include "net/url_request/url_request_status.h" 23 #include "net/url_request/url_request_status.h"
24 24
25 namespace { 25 namespace {
26 26
27 const char kResponseDataValue[] = "responseData"; 27 const char kResponseDataValue[] = "responseData";
28 const char kResultsValue[] = "results"; 28 const char kResultsValue[] = "results";
29 const char kUnescapedUrlValue[] = "unescapedUrl"; 29 const char kUnescapedUrlValue[] = "unescapedUrl";
30 const char kDiscoveryBackendURL[] = 30 const char kDiscoveryBackendURL[] =
31 "https://ajax.googleapis.com/ajax/services/search/news?v=1.0&q=a&rsz=8"; 31 "https://ajax.googleapis.com/ajax/services/search/news?v=1.0&q=a&rsz=8";
32 32
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
« no previous file with comments | « chrome/browser/ui/webui/ntp/suggestions_source_discovery.h ('k') | chrome/browser/web_resource/web_resource_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698