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

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: comments. 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
« no previous file with comments | « no previous file | components/offline_pages/offline_page_model_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 DeleteExistingPagesWithSameURL(const OfflinePageItem& offline_page);
218 int64_t offline_id, 218 void OnPagesFoundWithSameURL(const OfflinePageItem& offline_page,
219 size_t pages_allowed, 219 size_t pages_allowed,
220 const MultipleOfflinePageItemResult& items); 220 const MultipleOfflinePageItemResult& items);
221 void OnDeleteOldPagesWithSameURL(DeletePageResult result); 221 void OnDeleteOldPagesWithSameURL(DeletePageResult result);
222 222
223 // Steps for clearing all. 223 // Steps for clearing all.
224 void OnRemoveAllFilesDoneForClearAll(const base::Closure& callback, 224 void OnRemoveAllFilesDoneForClearAll(const base::Closure& callback,
225 DeletePageResult result); 225 DeletePageResult result);
226 void OnResetStoreDoneForClearAll(const base::Closure& callback, bool success); 226 void OnResetStoreDoneForClearAll(const base::Closure& callback, bool success);
227 void OnReloadStoreDoneForClearAll( 227 void OnReloadStoreDoneForClearAll(
228 const base::Closure& callback, 228 const base::Closure& callback,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 OfflinePageModelEventLogger offline_event_logger_; 292 OfflinePageModelEventLogger offline_event_logger_;
293 293
294 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; 294 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_;
295 295
296 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); 296 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl);
297 }; 297 };
298 298
299 } // namespace offline_pages 299 } // namespace offline_pages
300 300
301 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ 301 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | components/offline_pages/offline_page_model_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698