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

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

Issue 2067143004: [Offline Pages] Duplicate pages when save/delete bookmarks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving to model level. Created 4 years, 6 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // in metadata store. 201 // in metadata store.
202 void ExpirePagesMissingArchiveFile( 202 void ExpirePagesMissingArchiveFile(
203 const std::set<base::FilePath>& archive_paths); 203 const std::set<base::FilePath>& archive_paths);
204 void OnExpirePagesMissingArchiveFileDone( 204 void OnExpirePagesMissingArchiveFileDone(
205 const std::vector<int64_t>& offline_ids, 205 const std::vector<int64_t>& offline_ids,
206 bool success); 206 bool success);
207 void DeleteOrphanedArchives(const std::set<base::FilePath>& archive_paths); 207 void DeleteOrphanedArchives(const std::set<base::FilePath>& archive_paths);
208 void OnDeleteOrphanedArchivesDone(const std::vector<base::FilePath>& archives, 208 void OnDeleteOrphanedArchivesDone(const std::vector<base::FilePath>& archives,
209 bool success); 209 bool success);
210 210
211 // Callbacks for deleting pages with same URL when saving pages.
212 void OnPagesFoundWithSameURL(const ClientId& client_id,
213 int64_t offline_id,
214 const MultipleOfflinePageItemResult& items);
215 void OnDeleteOldPagesWithSameURL(DeletePageResult result);
216
211 // Steps for clearing all. 217 // Steps for clearing all.
212 void OnRemoveAllFilesDoneForClearAll(const base::Closure& callback, 218 void OnRemoveAllFilesDoneForClearAll(const base::Closure& callback,
213 DeletePageResult result); 219 DeletePageResult result);
214 void OnResetStoreDoneForClearAll(const base::Closure& callback, bool success); 220 void OnResetStoreDoneForClearAll(const base::Closure& callback, bool success);
215 void OnReloadStoreDoneForClearAll( 221 void OnReloadStoreDoneForClearAll(
216 const base::Closure& callback, 222 const base::Closure& callback,
217 OfflinePageMetadataStore::LoadStatus load_status, 223 OfflinePageMetadataStore::LoadStatus load_status,
218 const std::vector<OfflinePageItem>& offline_pages); 224 const std::vector<OfflinePageItem>& offline_pages);
219 225
220 void CacheLoadedData(const std::vector<OfflinePageItem>& offline_pages); 226 void CacheLoadedData(const std::vector<OfflinePageItem>& offline_pages);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 std::unique_ptr<ArchiveManager> archive_manager_; 280 std::unique_ptr<ArchiveManager> archive_manager_;
275 281
276 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; 282 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_;
277 283
278 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); 284 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl);
279 }; 285 };
280 286
281 } // namespace offline_pages 287 } // namespace offline_pages
282 288
283 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ 289 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698