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

Side by Side Diff: components/history/core/browser/top_sites_impl.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 2 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 COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_IMPL_H_ 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_IMPL_H_
6 #define COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_IMPL_H_ 6 #define COMPONENTS_HISTORY_CORE_BROWSER_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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 scoped_ptr<TopSitesCache> thread_safe_cache_; 264 scoped_ptr<TopSitesCache> thread_safe_cache_;
265 265
266 // Lock used to access |thread_safe_cache_|. 266 // Lock used to access |thread_safe_cache_|.
267 mutable base::Lock lock_; 267 mutable base::Lock lock_;
268 268
269 // Task tracker for history and backend requests. 269 // Task tracker for history and backend requests.
270 base::CancelableTaskTracker cancelable_task_tracker_; 270 base::CancelableTaskTracker cancelable_task_tracker_;
271 271
272 // Timer that asks history for the top sites. This is used to make sure our 272 // Timer that asks history for the top sites. This is used to make sure our
273 // data stays in sync with history. 273 // data stays in sync with history.
274 base::OneShotTimer<TopSitesImpl> timer_; 274 base::OneShotTimer timer_;
275 275
276 // The time we started |timer_| at. Only valid if |timer_| is running. 276 // The time we started |timer_| at. Only valid if |timer_| is running.
277 base::TimeTicks timer_start_time_; 277 base::TimeTicks timer_start_time_;
278 278
279 // The number of URLs changed on the last update. 279 // The number of URLs changed on the last update.
280 size_t last_num_urls_changed_; 280 size_t last_num_urls_changed_;
281 281
282 // The pending requests for the top sites list. Can only be non-empty at 282 // The pending requests for the top sites list. Can only be non-empty at
283 // startup. After we read the top sites from the DB, we'll always have a 283 // startup. After we read the top sites from the DB, we'll always have a
284 // cached list and be able to run callbacks immediately. 284 // cached list and be able to run callbacks immediately.
(...skipping 28 matching lines...) Expand all
313 313
314 ScopedObserver<HistoryService, HistoryServiceObserver> 314 ScopedObserver<HistoryService, HistoryServiceObserver>
315 history_service_observer_; 315 history_service_observer_;
316 316
317 DISALLOW_COPY_AND_ASSIGN(TopSitesImpl); 317 DISALLOW_COPY_AND_ASSIGN(TopSitesImpl);
318 }; 318 };
319 319
320 } // namespace history 320 } // namespace history
321 321
322 #endif // COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_IMPL_H_ 322 #endif // COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_IMPL_H_
OLDNEW
« no previous file with comments | « components/feedback/feedback_uploader.h ('k') | components/invalidation/impl/registration_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698