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

Side by Side Diff: chrome/browser/history/top_sites.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: Addressed comments 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_HISTORY_TOP_SITES_H_ 5 #ifndef CHROME_BROWSER_HISTORY_TOP_SITES_H_
6 #define CHROME_BROWSER_HISTORY_TOP_SITES_H_ 6 #define CHROME_BROWSER_HISTORY_TOP_SITES_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 26 matching lines...) Expand all
37 // descriptions below). All others are assumed to be threadsafe. 37 // descriptions below). All others are assumed to be threadsafe.
38 class TopSites 38 class TopSites
39 : public base::RefCountedThreadSafe<TopSites>, 39 : public base::RefCountedThreadSafe<TopSites>,
40 public content::NotificationObserver { 40 public content::NotificationObserver {
41 public: 41 public:
42 TopSites() {} 42 TopSites() {}
43 43
44 // Initializes TopSites. 44 // Initializes TopSites.
45 static TopSites* Create(Profile* profile, const base::FilePath& db_name); 45 static TopSites* Create(Profile* profile, const base::FilePath& db_name);
46 46
47 // Helper method to shuffle MostVisited tiles for A/B testing purposes.
48 static void MaybeShuffle(MostVisitedURLList* data);
49
50 // Sets the given thumbnail for the given URL. Returns true if the thumbnail 47 // Sets the given thumbnail for the given URL. Returns true if the thumbnail
51 // was updated. False means either the URL wasn't known to us, or we felt 48 // was updated. False means either the URL wasn't known to us, or we felt
52 // that our current thumbnail was superior to the given one. Should be called 49 // that our current thumbnail was superior to the given one. Should be called
53 // from the UI thread. 50 // from the UI thread.
54 virtual bool SetPageThumbnail(const GURL& url, 51 virtual bool SetPageThumbnail(const GURL& url,
55 const gfx::Image& thumbnail, 52 const gfx::Image& thumbnail,
56 const ThumbnailScore& score) = 0; 53 const ThumbnailScore& score) = 0;
57 54
58 // While testing the history system, we want to set the thumbnail to a piece 55 // While testing the history system, we want to set the thumbnail to a piece
59 // of static memory. 56 // of static memory.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 173
177 #if defined(OS_ANDROID) 174 #if defined(OS_ANDROID)
178 extern const TopSites::PrepopulatedPage kPrepopulatedPages[1]; 175 extern const TopSites::PrepopulatedPage kPrepopulatedPages[1];
179 #else 176 #else
180 extern const TopSites::PrepopulatedPage kPrepopulatedPages[2]; 177 extern const TopSites::PrepopulatedPage kPrepopulatedPages[2];
181 #endif 178 #endif
182 179
183 } // namespace history 180 } // namespace history
184 181
185 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_H_ 182 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698