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

Side by Side Diff: components/precache/content/precache_manager.h

Issue 1961153003: Add pause/resume functionality to precache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_PRECACHE_CONTENT_PRECACHE_MANAGER_H_ 5 #ifndef COMPONENTS_PRECACHE_CONTENT_PRECACHE_MANAGER_H_
6 #define COMPONENTS_PRECACHE_CONTENT_PRECACHE_MANAGER_H_ 6 #define COMPONENTS_PRECACHE_CONTENT_PRECACHE_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 enum class AllowedType { 108 enum class AllowedType {
109 ALLOWED, 109 ALLOWED,
110 DISALLOWED, 110 DISALLOWED,
111 PENDING 111 PENDING
112 }; 112 };
113 113
114 // From KeyedService. 114 // From KeyedService.
115 void Shutdown() override; 115 void Shutdown() override;
116 116
117 // From PrecacheFetcher::PrecacheDelegate. 117 // From PrecacheFetcher::PrecacheDelegate.
118 void OnInitDone() override;
118 void OnDone() override; 119 void OnDone() override;
120 void OnShutdownDone() override;
121
119 122
120 // From history::HistoryService::TopHosts. 123 // From history::HistoryService::TopHosts.
121 void OnHostsReceived(const history::TopHostsList& host_counts); 124 void OnHostsReceived(const history::TopHostsList& host_counts);
122 125
123 // From history::HistoryService::TopHosts. Used for the control group, which 126 // From history::HistoryService::TopHosts. Used for the control group, which
124 // gets the list of TopHosts for metrics purposes, but otherwise does nothing. 127 // gets the list of TopHosts for metrics purposes, but otherwise does nothing.
125 void OnHostsReceivedThenDone(const history::TopHostsList& host_counts); 128 void OnHostsReceivedThenDone(const history::TopHostsList& host_counts);
126 129
127 // Returns true if precaching is allowed for the browser context. 130 // Returns true if precaching is allowed for the browser context.
128 AllowedType PrecachingAllowed() const; 131 AllowedType PrecachingAllowed() const;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 164
162 // Flag indicating whether or not precaching is currently in progress. 165 // Flag indicating whether or not precaching is currently in progress.
163 bool is_precaching_; 166 bool is_precaching_;
164 167
165 DISALLOW_COPY_AND_ASSIGN(PrecacheManager); 168 DISALLOW_COPY_AND_ASSIGN(PrecacheManager);
166 }; 169 };
167 170
168 } // namespace precache 171 } // namespace precache
169 172
170 #endif // COMPONENTS_PRECACHE_CONTENT_PRECACHE_MANAGER_H_ 173 #endif // COMPONENTS_PRECACHE_CONTENT_PRECACHE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698