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

Unified Diff: components/precache/content/precache_manager.h

Issue 1272443002: Only set precache.last_time when precache ran. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@filter_stats
Patch Set: Created 5 years, 4 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: components/precache/content/precache_manager.h
diff --git a/components/precache/content/precache_manager.h b/components/precache/content/precache_manager.h
index 912a41fc055467bd7689ea344427c34f2ff79150..166379a6c4650a55774eb04100f0be8b59cbd2eb 100644
--- a/components/precache/content/precache_manager.h
+++ b/components/precache/content/precache_manager.h
@@ -54,7 +54,7 @@ class PrecacheManager : public KeyedService,
public PrecacheFetcher::PrecacheDelegate,
public base::SupportsWeakPtr<PrecacheManager> {
public:
- typedef base::Closure PrecacheCompletionCallback;
+ typedef base::Callback<void(bool)> PrecacheCompletionCallback;
PrecacheManager(content::BrowserContext* browser_context,
const sync_driver::SyncService* const sync_service);
@@ -71,8 +71,9 @@ class PrecacheManager : public KeyedService,
// Starts precaching resources that the user is predicted to fetch in the
// future. If precaching is already currently in progress, then this method
- // does nothing. The |precache_completion_callback| will be run when
- // precaching finishes, but will not be run if precaching is canceled.
+ // does nothing. The |precache_completion_callback| will be passed true when
+ // precaching finishes, and passed false when precaching abort due to failed
+ // preconditions, but will not be run if precaching is canceled.
void StartPrecaching(
const PrecacheCompletionCallback& precache_completion_callback,
const history::HistoryService& history_service);

Powered by Google App Engine
This is Rietveld 408576698