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

Unified Diff: chrome/browser/ui/webui/ntp/suggestions_source_discovery.h

Issue 10438004: Hooking the discovery API to the NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added OWNERS for experimental discovery api. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/ntp/suggestions_source_discovery.h
diff --git a/chrome/browser/ui/webui/ntp/suggestions_source_discovery.h b/chrome/browser/ui/webui/ntp/suggestions_source_discovery.h
index 4e7d3696481688ebd0bbf3cbe12ff9471c1cad65..a38ef346412250745cccfc8a5f647887d734e7da 100644
--- a/chrome/browser/ui/webui/ntp/suggestions_source_discovery.h
+++ b/chrome/browser/ui/webui/ntp/suggestions_source_discovery.h
@@ -7,11 +7,11 @@
#pragma once
#include <deque>
+#include <string>
-#include "chrome/browser/cancelable_request.h"
-#include "chrome/browser/history/history_types.h"
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
#include "chrome/browser/ui/webui/ntp/suggestions_source.h"
-#include "net/url_request/url_fetcher_delegate.h"
class SuggestionsCombiner;
class Profile;
@@ -20,20 +20,13 @@ namespace base {
class DictionaryValue;
}
-namespace net {
-class URLFetcher;
-}
-
-// A source that suggests websites the user might find interesting.
-class SuggestionsSourceDiscovery : public SuggestionsSource,
- public net::URLFetcherDelegate {
+// A source linked to a single extension using the discovery API to suggest
+// websites the user might find interesting.
+class SuggestionsSourceDiscovery : public SuggestionsSource {
public:
- SuggestionsSourceDiscovery();
+ explicit SuggestionsSourceDiscovery(const std::string& extension_id);
virtual ~SuggestionsSourceDiscovery();
- // net::URLFetcherDelegate override and implementation.
- virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
-
protected:
// SuggestionsSource overrides:
virtual int GetWeight() OVERRIDE;
@@ -49,8 +42,8 @@ class SuggestionsSourceDiscovery : public SuggestionsSource,
// Keep the results fetched from the discovery service here.
std::deque<base::DictionaryValue*> items_;
- // Fetcher for the recommended pages.
- scoped_ptr<net::URLFetcher> recommended_fetcher_;
+ // The extension associated with this source.
+ std::string extension_id_;
DISALLOW_COPY_AND_ASSIGN(SuggestionsSourceDiscovery);
};
« no previous file with comments | « chrome/browser/ui/webui/ntp/suggestions_source.h ('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