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

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

Issue 17114002: Field trial removing tiles from NTP if URL is already open - for 1993 clients (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Spacing fix Created 7 years, 5 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
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_MOST_VISITED_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 // Callback for TopSites. 84 // Callback for TopSites.
85 void OnMostVisitedUrlsAvailable(const history::MostVisitedURLList& data); 85 void OnMostVisitedUrlsAvailable(const history::MostVisitedURLList& data);
86 86
87 // Puts the passed URL in the blacklist (so it does not show as a thumbnail). 87 // Puts the passed URL in the blacklist (so it does not show as a thumbnail).
88 void BlacklistUrl(const GURL& url); 88 void BlacklistUrl(const GURL& url);
89 89
90 // Returns the key used in url_blacklist_ for the passed |url|. 90 // Returns the key used in url_blacklist_ for the passed |url|.
91 std::string GetDictionaryKeyForUrl(const std::string& url); 91 std::string GetDictionaryKeyForUrl(const std::string& url);
92 92
93 // Looks at the browser's currently open URLs and removes any matching URLs 93 // Removes recommended URLs if a matching URL is already open in the Browser,
94 // from |pages_value_|. 94 // if the Most Visited Tile Placement experiment is enabled, and the client is
95 void RemovePageValuesMatchingOpenTabs(); 95 // in the experiment group.
96 void MaybeRemovePageValues();
96 97
97 // Sends pages_value_ to the javascript side and resets page_value_. 98 // Sends pages_value_ to the javascript side and resets page_value_.
98 void SendPagesValue(); 99 void SendPagesValue();
99 100
100 content::NotificationRegistrar registrar_; 101 content::NotificationRegistrar registrar_;
101 102
102 // For callbacks may be run after destruction. 103 // For callbacks may be run after destruction.
103 base::WeakPtrFactory<MostVisitedHandler> weak_ptr_factory_; 104 base::WeakPtrFactory<MostVisitedHandler> weak_ptr_factory_;
104 105
105 // The most visited URLs, in priority order. 106 // The most visited URLs, in priority order.
(...skipping 11 matching lines...) Expand all
117 // Whether the user has viewed the 'most visited' pane. 118 // Whether the user has viewed the 'most visited' pane.
118 bool most_visited_viewed_; 119 bool most_visited_viewed_;
119 120
120 // Whether the user has performed a "tracked" action to leave the page or not. 121 // Whether the user has performed a "tracked" action to leave the page or not.
121 bool user_action_logged_; 122 bool user_action_logged_;
122 123
123 DISALLOW_COPY_AND_ASSIGN(MostVisitedHandler); 124 DISALLOW_COPY_AND_ASSIGN(MostVisitedHandler);
124 }; 125 };
125 126
126 #endif // CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ 127 #endif // CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698