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

Side by Side Diff: components/offline_pages/offline_page_model_impl.h

Issue 2342443006: [Offline pages] Use the new policy bits (Closed)
Patch Set: fix download bridge and ntp suggestions to use correct policy controller Created 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 void ClearStorageIfNeeded( 250 void ClearStorageIfNeeded(
251 const OfflinePageStorageManager::ClearStorageCallback& callback); 251 const OfflinePageStorageManager::ClearStorageCallback& callback);
252 252
253 // Callback completing storage clearing. 253 // Callback completing storage clearing.
254 void OnStorageCleared(size_t expired_page_count, 254 void OnStorageCleared(size_t expired_page_count,
255 OfflinePageStorageManager::ClearStorageResult result); 255 OfflinePageStorageManager::ClearStorageResult result);
256 256
257 // Post task to clear storage. 257 // Post task to clear storage.
258 void PostClearStorageIfNeededTask(); 258 void PostClearStorageIfNeededTask();
259 259
260 // Check if |offline_page| is user-requested. 260 // Check if |offline_page| should be removed on cache reset by user.
261 bool IsUserRequestedPage(const OfflinePageItem& offline_page) const; 261 bool IsRemovedOnCacheReset(const OfflinePageItem& offline_page) const;
262 262
263 void RunWhenLoaded(const base::Closure& job); 263 void RunWhenLoaded(const base::Closure& job);
264 264
265 base::Time GetCurrentTime() const; 265 base::Time GetCurrentTime() const;
266 266
267 // Persistent store for offline page metadata. 267 // Persistent store for offline page metadata.
268 std::unique_ptr<OfflinePageMetadataStore> store_; 268 std::unique_ptr<OfflinePageMetadataStore> store_;
269 269
270 // Location where all of the archive files will be stored. 270 // Location where all of the archive files will be stored.
271 base::FilePath archives_dir_; 271 base::FilePath archives_dir_;
(...skipping 30 matching lines...) Expand all
302 base::Clock* testing_clock_; 302 base::Clock* testing_clock_;
303 303
304 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; 304 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_;
305 305
306 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); 306 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl);
307 }; 307 };
308 308
309 } // namespace offline_pages 309 } // namespace offline_pages
310 310
311 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ 311 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698