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

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

Issue 2497703002: [Offline pages] Resetting offline page metadata store to handle LOAD/INIT failures (Closed)
Patch Set: Addressing STORE_INIT_FAILED Created 4 years, 1 month 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698