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

Side by Side Diff: chrome/browser/history/top_sites_impl.h

Issue 1005873011: Only record the execution time during startup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 8 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_IMPL_H_ 5 #ifndef CHROME_BROWSER_HISTORY_TOP_SITES_IMPL_H_
6 #define CHROME_BROWSER_HISTORY_TOP_SITES_IMPL_H_ 6 #define CHROME_BROWSER_HISTORY_TOP_SITES_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 void Observe(int type, 188 void Observe(int type,
189 const content::NotificationSource& source, 189 const content::NotificationSource& source,
190 const content::NotificationDetails& details) override; 190 const content::NotificationDetails& details) override;
191 191
192 // Updates URLs in |cache_| and the db (in the background). 192 // Updates URLs in |cache_| and the db (in the background).
193 // The non-forced URLs in |new_top_sites| replace those in |cache_|. 193 // The non-forced URLs in |new_top_sites| replace those in |cache_|.
194 // The forced URLs of |new_top_sites| are merged with those in |cache_|, 194 // The forced URLs of |new_top_sites| are merged with those in |cache_|,
195 // if the list of forced URLs overflows, the oldest ones are dropped. 195 // if the list of forced URLs overflows, the oldest ones are dropped.
196 // All mutations to cache_ *must* go through this. Should 196 // All mutations to cache_ *must* go through this. Should
197 // be called from the UI thread. 197 // be called from the UI thread.
198 void SetTopSites(const MostVisitedURLList& new_top_sites); 198 // The bool param is used for knowing whether this function is called during
199 // startup or not, thus histogram value could be recorded accordingly.
200 // TODO(yiyaoliu): Remove this when crbug/223430 is fixed.
201 void SetTopSites(const MostVisitedURLList& new_top_sites, bool startup);
sky 2015/03/31 23:58:49 Please use an enum to avoid a mysterious true/fals
yao 2015/04/01 21:43:00 I was having debating on the naming of the enum, a
199 202
200 // Returns the number of most visited results to request from history. This 203 // Returns the number of most visited results to request from history. This
201 // changes depending upon how many urls have been blacklisted. Should be 204 // changes depending upon how many urls have been blacklisted. Should be
202 // called from the UI thread. 205 // called from the UI thread.
203 int num_results_to_request_from_history() const; 206 int num_results_to_request_from_history() const;
204 207
205 // Invoked when transitioning to LOADED. Notifies any queued up callbacks. 208 // Invoked when transitioning to LOADED. Notifies any queued up callbacks.
206 // Should be called from the UI thread. 209 // Should be called from the UI thread.
207 void MoveStateToLoaded(); 210 void MoveStateToLoaded();
208 211
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 281
279 ScopedObserver<HistoryService, HistoryServiceObserver> 282 ScopedObserver<HistoryService, HistoryServiceObserver>
280 history_service_observer_; 283 history_service_observer_;
281 284
282 DISALLOW_COPY_AND_ASSIGN(TopSitesImpl); 285 DISALLOW_COPY_AND_ASSIGN(TopSitesImpl);
283 }; 286 };
284 287
285 } // namespace history 288 } // namespace history
286 289
287 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_IMPL_H_ 290 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/history/top_sites_impl.cc » ('j') | components/history/core/browser/top_sites_backend.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698