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

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

Issue 10386063: Move URLFetcherDelegate to net/ and split URLFetcher between net/ and content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head, fix win component build 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 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_SOURCE_DISCOVERY_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_SOURCE_DISCOVERY_H_
6 #define CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_SOURCE_DISCOVERY_H_ 6 #define CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_SOURCE_DISCOVERY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 10
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 // A source that suggests websites the user might find interesting. 24 // A source that suggests websites the user might find interesting.
25 class SuggestionsSourceDiscovery : public SuggestionsSource, 25 class SuggestionsSourceDiscovery : public SuggestionsSource,
26 public content::URLFetcherDelegate { 26 public content::URLFetcherDelegate {
27 public: 27 public:
28 SuggestionsSourceDiscovery(); 28 SuggestionsSourceDiscovery();
29 virtual ~SuggestionsSourceDiscovery(); 29 virtual ~SuggestionsSourceDiscovery();
30 30
31 // content::URLFetcherDelegate override and implementation. 31 // content::URLFetcherDelegate override and implementation.
32 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; 32 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
33 33
34 protected: 34 protected:
35 // SuggestionsSource overrides: 35 // SuggestionsSource overrides:
36 virtual int GetWeight() OVERRIDE; 36 virtual int GetWeight() OVERRIDE;
37 virtual int GetItemCount() OVERRIDE; 37 virtual int GetItemCount() OVERRIDE;
38 virtual base::DictionaryValue* PopItem() OVERRIDE; 38 virtual base::DictionaryValue* PopItem() OVERRIDE;
39 virtual void FetchItems(Profile* profile) OVERRIDE; 39 virtual void FetchItems(Profile* profile) OVERRIDE;
40 virtual void SetCombiner(SuggestionsCombiner* combiner) OVERRIDE; 40 virtual void SetCombiner(SuggestionsCombiner* combiner) OVERRIDE;
41 41
42 private: 42 private:
43 // Our combiner. 43 // Our combiner.
44 SuggestionsCombiner* combiner_; 44 SuggestionsCombiner* combiner_;
45 45
46 // Keep the results fetched from the discovery service here. 46 // Keep the results fetched from the discovery service here.
47 std::deque<base::DictionaryValue*> items_; 47 std::deque<base::DictionaryValue*> items_;
48 48
49 // Fetcher for the recommended pages. 49 // Fetcher for the recommended pages.
50 scoped_ptr<content::URLFetcher> recommended_fetcher_; 50 scoped_ptr<content::URLFetcher> recommended_fetcher_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(SuggestionsSourceDiscovery); 52 DISALLOW_COPY_AND_ASSIGN(SuggestionsSourceDiscovery);
53 }; 53 };
54 54
55 #endif // CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_SOURCE_DISCOVERY_H_ 55 #endif // CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_SOURCE_DISCOVERY_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/intents/web_intent_picker_controller.cc ('k') | chrome/browser/ui/webui/ntp/suggestions_source_discovery.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698