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

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

Issue 2343743002: [Offline pages] Updating the UpdateCallback in OPMStoreSQL (Closed)
Patch Set: Created 4 years, 3 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 void InformSavePageDone(const SavePageCallback& callback, 184 void InformSavePageDone(const SavePageCallback& callback,
185 SavePageResult result, 185 SavePageResult result,
186 const ClientId& client_id, 186 const ClientId& client_id,
187 int64_t offline_id); 187 int64_t offline_id);
188 void DeletePendingArchiver(OfflinePageArchiver* archiver); 188 void DeletePendingArchiver(OfflinePageArchiver* archiver);
189 189
190 // Steps for deleting files and data for an offline page. 190 // Steps for deleting files and data for an offline page.
191 void OnDeleteArchiveFilesDone(const std::vector<int64_t>& offline_ids, 191 void OnDeleteArchiveFilesDone(const std::vector<int64_t>& offline_ids,
192 const DeletePageCallback& callback, 192 const DeletePageCallback& callback,
193 bool success); 193 bool success);
194 void OnRemoveOfflinePagesDone(const std::vector<int64_t>& offline_ids, 194 void OnRemoveOfflinePagesDone(
195 const DeletePageCallback& callback, 195 const DeletePageCallback& callback,
196 bool success); 196 const std::map<int64_t, OfflinePageMetadataStore::ItemActionStatus>&
197 failed_items,
198 const std::vector<OfflinePageItem>& removed_pages);
197 void InformDeletePageDone(const DeletePageCallback& callback, 199 void InformDeletePageDone(const DeletePageCallback& callback,
198 DeletePageResult result); 200 DeletePageResult result);
199 201
200 void OnMarkPageAccesseDone(const OfflinePageItem& offline_page_item, 202 void OnMarkPageAccesseDone(
201 bool success); 203 const OfflinePageItem& offline_page_item,
204 const std::map<int64_t, OfflinePageMetadataStore::ItemActionStatus>&
205 failed_results,
206 const std::vector<OfflinePageItem>& updated_items);
202 207
203 // Callbacks for checking metadata consistency. 208 // Callbacks for checking metadata consistency.
204 void CheckMetadataConsistencyForArchivePaths( 209 void CheckMetadataConsistencyForArchivePaths(
205 const std::set<base::FilePath>& archive_paths); 210 const std::set<base::FilePath>& archive_paths);
206 // Callback called after headless archives deleted. Orphaned archives are 211 // Callback called after headless archives deleted. Orphaned archives are
207 // archives files on disk which are not pointed to by any of the page items 212 // archives files on disk which are not pointed to by any of the page items
208 // in metadata store. 213 // in metadata store.
209 void ExpirePagesMissingArchiveFile( 214 void ExpirePagesMissingArchiveFile(
210 const std::set<base::FilePath>& archive_paths); 215 const std::set<base::FilePath>& archive_paths);
211 void OnExpirePagesMissingArchiveFileDone( 216 void OnExpirePagesMissingArchiveFileDone(
(...skipping 24 matching lines...) Expand all
236 // Actually does the work of deleting, requires the model is loaded. 241 // Actually does the work of deleting, requires the model is loaded.
237 void DoDeletePagesByOfflineId(const std::vector<int64_t>& offline_ids, 242 void DoDeletePagesByOfflineId(const std::vector<int64_t>& offline_ids,
238 const DeletePageCallback& callback); 243 const DeletePageCallback& callback);
239 244
240 // Similar to DoDeletePagesByOfflineId, does actual work of deleting, and 245 // Similar to DoDeletePagesByOfflineId, does actual work of deleting, and
241 // requires that the model is loaded. 246 // requires that the model is loaded.
242 void DoDeleteCachedPagesByURLPredicate(const UrlPredicate& predicate, 247 void DoDeleteCachedPagesByURLPredicate(const UrlPredicate& predicate,
243 const DeletePageCallback& callback); 248 const DeletePageCallback& callback);
244 249
245 // Callback completing page expiration. 250 // Callback completing page expiration.
246 void OnExpirePageDone(const std::vector<OfflinePageItem>& expired_pages, 251 void OnExpirePageDone(
247 const base::Time& expiration_time, 252 const base::Time& expiration_time,
248 bool success); 253 const std::map<int64_t, OfflinePageMetadataStore::ItemActionStatus>&
254 failed_results,
255 const std::vector<OfflinePageItem>& expired_pages);
249 256
250 // Clears expired pages if there are any. 257 // Clears expired pages if there are any.
251 void ClearStorageIfNeeded( 258 void ClearStorageIfNeeded(
252 const OfflinePageStorageManager::ClearStorageCallback& callback); 259 const OfflinePageStorageManager::ClearStorageCallback& callback);
253 260
254 // Callback completing storage clearing. 261 // Callback completing storage clearing.
255 void OnStorageCleared(size_t expired_page_count, 262 void OnStorageCleared(size_t expired_page_count,
256 OfflinePageStorageManager::ClearStorageResult result); 263 OfflinePageStorageManager::ClearStorageResult result);
257 264
258 // Post task to clear storage. 265 // Post task to clear storage.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 base::Clock* testing_clock_; 310 base::Clock* testing_clock_;
304 311
305 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; 312 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_;
306 313
307 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); 314 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl);
308 }; 315 };
309 316
310 } // namespace offline_pages 317 } // namespace offline_pages
311 318
312 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ 319 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698