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

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

Issue 1970953002: [Offline Pages] Adding more expiration logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@interface
Patch Set: fixing builds. 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 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_STORAGE_MANAGER_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_STORAGE_MANAGER_H_
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_STORAGE_MANAGER_H_ 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_STORAGE_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 std::vector<int64_t>& offline_ids); 67 std::vector<int64_t>& offline_ids);
68 68
69 // Callback when expired pages has been deleted. 69 // Callback when expired pages has been deleted.
70 void OnExpiredPagesDeleted(const ClearPageCallback& callback, 70 void OnExpiredPagesDeleted(const ClearPageCallback& callback,
71 int pages_to_clear, 71 int pages_to_clear,
72 DeletePageResult result); 72 DeletePageResult result);
73 73
74 // Determine if manager should clear pages. 74 // Determine if manager should clear pages.
75 bool ShouldClearPages(); 75 bool ShouldClearPages();
76 76
77 // Return true if |page| is expired. 77 // Return true if |page| is expired comparing to |now|.
78 bool IsPageExpired(const OfflinePageItem& page); 78 bool IsPageExpired(const base::Time& now, const OfflinePageItem& page);
79 79
80 // Not owned. 80 // Not owned.
81 Client* client_; 81 Client* client_;
82 82
83 // Not owned. 83 // Not owned.
84 ClientPolicyController* policy_controller_; 84 ClientPolicyController* policy_controller_;
85 85
86 bool in_progress_; 86 bool in_progress_;
87 87
88 base::WeakPtrFactory<OfflinePageStorageManager> weak_ptr_factory_; 88 base::WeakPtrFactory<OfflinePageStorageManager> weak_ptr_factory_;
89 89
90 DISALLOW_COPY_AND_ASSIGN(OfflinePageStorageManager); 90 DISALLOW_COPY_AND_ASSIGN(OfflinePageStorageManager);
91 }; 91 };
92 92
93 } // namespace offline_pages 93 } // namespace offline_pages
94 94
95 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_STORAGE_MANAGER_H_ 95 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_STORAGE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698