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

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

Issue 10666009: Added already_open column to chrome://suggestions-internals. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressed comments Created 8 years, 6 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_combiner.h
diff --git a/chrome/browser/ui/webui/ntp/suggestions_combiner.h b/chrome/browser/ui/webui/ntp/suggestions_combiner.h
index 593232112fcc735f22cd53a6a16ff3b969c17d5d..f3e46751109a81b8517cc7ccc59e4bdd8d790b98 100644
--- a/chrome/browser/ui/webui/ntp/suggestions_combiner.h
+++ b/chrome/browser/ui/webui/ntp/suggestions_combiner.h
@@ -12,11 +12,13 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
+class GURL;
class SuggestionsHandler;
class SuggestionsSource;
class Profile;
namespace base {
+ class DictionaryValue;
class ListValue;
}
@@ -64,13 +66,22 @@ class SuggestionsCombiner {
private:
friend class SuggestionsCombinerTest;
- explicit SuggestionsCombiner(SuggestionsCombiner::Delegate* delegate);
+ explicit SuggestionsCombiner(SuggestionsCombiner::Delegate* delegate,
+ Profile* profile);
// Fill the page values from the suggestion sources so they can be sent to
// the JavaScript side. This should only be called when all the suggestion
// sources have items ready.
void FillPageValues();
+ // Add extra information to page values that should be common across all
+ // suggestion sources.
+ void AddExtendedInformation(base::DictionaryValue* page_value);
+
+ // Checks if a URL is already open for the current profile. URLs open in an
+ // incognito window are not reported.
+ bool IsURLAlreadyOpen(const GURL& url);
+
typedef ScopedVector<SuggestionsSource> SuggestionsSources;
// List of all the suggestions sources that will be combined to generate a
@@ -95,6 +106,8 @@ class SuggestionsCombiner {
// results).
bool debug_enabled_;
+ Profile* profile_;
+
DISALLOW_COPY_AND_ASSIGN(SuggestionsCombiner);
};

Powered by Google App Engine
This is Rietveld 408576698