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

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

Issue 2342443006: [Offline pages] Use the new policy bits (Closed)
Patch Set: i think i got it! Made sure it compiles 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 void ClearStorageIfNeeded( 240 void ClearStorageIfNeeded(
241 const OfflinePageStorageManager::ClearStorageCallback& callback); 241 const OfflinePageStorageManager::ClearStorageCallback& callback);
242 242
243 // Callback completing storage clearing. 243 // Callback completing storage clearing.
244 void OnStorageCleared(size_t expired_page_count, 244 void OnStorageCleared(size_t expired_page_count,
245 OfflinePageStorageManager::ClearStorageResult result); 245 OfflinePageStorageManager::ClearStorageResult result);
246 246
247 // Post task to clear storage. 247 // Post task to clear storage.
248 void PostClearStorageIfNeededTask(); 248 void PostClearStorageIfNeededTask();
249 249
250 // Check if |offline_page| is user-requested. 250 // Check if |offline_page| should be removed on cache reset by user.
251 bool IsUserRequestedPage(const OfflinePageItem& offline_page) const; 251 bool IsRemovedOnCacheReset(const OfflinePageItem& offline_page) const;
252 252
253 void RunWhenLoaded(const base::Closure& job); 253 void RunWhenLoaded(const base::Closure& job);
254 254
255 base::Time GetCurrentTime() const; 255 base::Time GetCurrentTime() const;
256 256
257 // Persistent store for offline page metadata. 257 // Persistent store for offline page metadata.
258 std::unique_ptr<OfflinePageMetadataStore> store_; 258 std::unique_ptr<OfflinePageMetadataStore> store_;
259 259
260 // Location where all of the archive files will be stored. 260 // Location where all of the archive files will be stored.
261 base::FilePath archives_dir_; 261 base::FilePath archives_dir_;
(...skipping 30 matching lines...) Expand all
292 base::Clock* testing_clock_; 292 base::Clock* testing_clock_;
293 293
294 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; 294 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_;
295 295
296 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); 296 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl);
297 }; 297 };
298 298
299 } // namespace offline_pages 299 } // namespace offline_pages
300 300
301 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ 301 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698