| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 const std::vector<int64_t> MaybeGetOfflineIdsForClientId( | 143 const std::vector<int64_t> MaybeGetOfflineIdsForClientId( |
| 144 const ClientId& client_id) const; | 144 const ClientId& client_id) const; |
| 145 void GetPagesByOnlineURLWhenLoadDone( | 145 void GetPagesByOnlineURLWhenLoadDone( |
| 146 const GURL& online_url, | 146 const GURL& online_url, |
| 147 const MultipleOfflinePageItemCallback& callback) const; | 147 const MultipleOfflinePageItemCallback& callback) const; |
| 148 void MarkPageAccessedWhenLoadDone(int64_t offline_id); | 148 void MarkPageAccessedWhenLoadDone(int64_t offline_id); |
| 149 | 149 |
| 150 void CheckMetadataConsistency(); | 150 void CheckMetadataConsistency(); |
| 151 | 151 |
| 152 // Callback for loading pages from the offline page metadata store. | 152 // Callback for loading pages from the offline page metadata store. |
| 153 void OnStoreInitialized(const base::TimeTicks& start_time, StoreState state); |
| 153 void OnLoadDone(const base::TimeTicks& start_time, | 154 void OnLoadDone(const base::TimeTicks& start_time, |
| 154 OfflinePageMetadataStore::LoadStatus load_status, | |
| 155 const std::vector<OfflinePageItem>& offline_pages); | 155 const std::vector<OfflinePageItem>& offline_pages); |
| 156 void CompleteLoad(); |
| 156 | 157 |
| 157 // Steps for saving a page offline. | 158 // Steps for saving a page offline. |
| 158 void OnCreateArchiveDone(const GURL& requested_url, | 159 void OnCreateArchiveDone(const GURL& requested_url, |
| 159 int64_t offline_id, | 160 int64_t offline_id, |
| 160 const ClientId& client_id, | 161 const ClientId& client_id, |
| 161 const base::Time& start_time, | 162 const base::Time& start_time, |
| 162 const SavePageCallback& callback, | 163 const SavePageCallback& callback, |
| 163 OfflinePageArchiver* archiver, | 164 OfflinePageArchiver* archiver, |
| 164 OfflinePageArchiver::ArchiverResult result, | 165 OfflinePageArchiver::ArchiverResult result, |
| 165 const GURL& url, | 166 const GURL& url, |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 base::Clock* testing_clock_; | 290 base::Clock* testing_clock_; |
| 290 | 291 |
| 291 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; | 292 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; |
| 292 | 293 |
| 293 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); | 294 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); |
| 294 }; | 295 }; |
| 295 | 296 |
| 296 } // namespace offline_pages | 297 } // namespace offline_pages |
| 297 | 298 |
| 298 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ | 299 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ |
| OLD | NEW |