Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 251 void ClearStorageIfNeeded( | 251 void ClearStorageIfNeeded( |
| 252 const OfflinePageStorageManager::ClearStorageCallback& callback); | 252 const OfflinePageStorageManager::ClearStorageCallback& callback); |
| 253 | 253 |
| 254 // Callback completing storage clearing. | 254 // Callback completing storage clearing. |
| 255 void OnStorageCleared(size_t expired_page_count, | 255 void OnStorageCleared(size_t expired_page_count, |
| 256 OfflinePageStorageManager::ClearStorageResult result); | 256 OfflinePageStorageManager::ClearStorageResult result); |
| 257 | 257 |
| 258 // Post task to clear storage. | 258 // Post task to clear storage. |
| 259 void PostClearStorageIfNeededTask(); | 259 void PostClearStorageIfNeededTask(); |
| 260 | 260 |
| 261 // Check if |offline_page| is user-requested. | 261 // Check if |offline_page| is user-requested. |
|
romax
2016/09/19 23:00:24
I think the function name change would also affect
chili
2016/09/20 00:02:33
Updated comment.
I'm inclined to keep the name as
| |
| 262 bool IsUserRequestedPage(const OfflinePageItem& offline_page) const; | 262 bool IsRemovedOnCacheReset(const OfflinePageItem& offline_page) const; |
|
Pete Williamson
2016/09/20 00:01:59
Drive-by:
Why rename the function? While the con
chili
2016/09/20 00:06:21
This came from comment on the original policy-bit
romax
2016/09/20 00:19:01
It seems that we can get rid of this method and us
| |
| 263 | 263 |
| 264 void RunWhenLoaded(const base::Closure& job); | 264 void RunWhenLoaded(const base::Closure& job); |
| 265 | 265 |
| 266 base::Time GetCurrentTime() const; | 266 base::Time GetCurrentTime() const; |
| 267 | 267 |
| 268 // Persistent store for offline page metadata. | 268 // Persistent store for offline page metadata. |
| 269 std::unique_ptr<OfflinePageMetadataStore> store_; | 269 std::unique_ptr<OfflinePageMetadataStore> store_; |
| 270 | 270 |
| 271 // Location where all of the archive files will be stored. | 271 // Location where all of the archive files will be stored. |
| 272 base::FilePath archives_dir_; | 272 base::FilePath archives_dir_; |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 303 base::Clock* testing_clock_; | 303 base::Clock* testing_clock_; |
| 304 | 304 |
| 305 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; | 305 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; |
| 306 | 306 |
| 307 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); | 307 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); |
| 308 }; | 308 }; |
| 309 | 309 |
| 310 } // namespace offline_pages | 310 } // namespace offline_pages |
| 311 | 311 |
| 312 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ | 312 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ |
| OLD | NEW |