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

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

Issue 2112183002: [Offline Pages] Refactoring deletion of pages with same urls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 void ExpirePagesMissingArchiveFile( 207 void ExpirePagesMissingArchiveFile(
208 const std::set<base::FilePath>& archive_paths); 208 const std::set<base::FilePath>& archive_paths);
209 void OnExpirePagesMissingArchiveFileDone( 209 void OnExpirePagesMissingArchiveFileDone(
210 const std::vector<int64_t>& offline_ids, 210 const std::vector<int64_t>& offline_ids,
211 bool success); 211 bool success);
212 void DeleteOrphanedArchives(const std::set<base::FilePath>& archive_paths); 212 void DeleteOrphanedArchives(const std::set<base::FilePath>& archive_paths);
213 void OnDeleteOrphanedArchivesDone(const std::vector<base::FilePath>& archives, 213 void OnDeleteOrphanedArchivesDone(const std::vector<base::FilePath>& archives,
214 bool success); 214 bool success);
215 215
216 // Callbacks for deleting pages with same URL when saving pages. 216 // Callbacks for deleting pages with same URL when saving pages.
217 void OnPagesFoundWithSameURL(const ClientId& client_id, 217 void DeleteExistingPageWithSameURL(SavePageResult result,
fgorski 2016/07/01 17:43:22 s/Page/Pages/
romax 2016/07/06 19:44:50 Done.
218 int64_t offline_id, 218 const OfflinePageItem& offline_page);
219 void OnPagesFoundWithSameURL(const OfflinePageItem& offline_page,
219 size_t pages_allowed, 220 size_t pages_allowed,
220 const MultipleOfflinePageItemResult& items); 221 const MultipleOfflinePageItemResult& items);
221 void OnDeleteOldPagesWithSameURL(DeletePageResult result); 222 void OnDeleteOldPagesWithSameURL(DeletePageResult result);
222 223
223 // Steps for clearing all. 224 // Steps for clearing all.
224 void OnRemoveAllFilesDoneForClearAll(const base::Closure& callback, 225 void OnRemoveAllFilesDoneForClearAll(const base::Closure& callback,
225 DeletePageResult result); 226 DeletePageResult result);
226 void OnResetStoreDoneForClearAll(const base::Closure& callback, bool success); 227 void OnResetStoreDoneForClearAll(const base::Closure& callback, bool success);
227 void OnReloadStoreDoneForClearAll( 228 void OnReloadStoreDoneForClearAll(
228 const base::Closure& callback, 229 const base::Closure& callback,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 OfflinePageModelEventLogger offline_event_logger_; 293 OfflinePageModelEventLogger offline_event_logger_;
293 294
294 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; 295 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_;
295 296
296 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); 297 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl);
297 }; 298 };
298 299
299 } // namespace offline_pages 300 } // namespace offline_pages
300 301
301 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ 302 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698