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: chrome/browser/android/offline_pages/offline_page_bookmark_observer.h

Issue 2185973003: [Offline Pages] Delete associated page along with bookmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing conflicts. 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BOOKMARK_OBSERVER_H_
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BOOKMARK_OBSERVER_H_
7
8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
10 #include "components/bookmarks/browser/base_bookmark_model_observer.h"
11 #include "components/offline_pages/offline_page_types.h"
12
13 class GURL;
14
15 namespace bookmarks {
16 class BookmarkModel;
17 class BookmarkNode;
18 }
19
20 namespace content {
21 class BrowserContext;
22 }
23
24 namespace offline_pages {
25
26 class OfflinePageBookmarkObserver
27 : public bookmarks::BaseBookmarkModelObserver {
28 public:
29 explicit OfflinePageBookmarkObserver(content::BrowserContext* context);
30 ~OfflinePageBookmarkObserver() override;
31
32 // Implement bookmarks::OfflinePageBookmarkObserver
33 void BookmarkModelChanged() override;
34 void BookmarkNodeRemoved(bookmarks::BookmarkModel* model,
35 const bookmarks::BookmarkNode* parent,
36 int old_index,
37 const bookmarks::BookmarkNode* node,
38 const std::set<GURL>& removed_urls) override;
39
40 private:
41 // Does work for actual expiring.
42 void DoExpireRemovedBookmarkPages(const MultipleOfflineIdResult& offline_ids);
43
44 // Callback for expiring removed bookmark pages.
45 void OnExpireRemovedBookmarkPagesDone(bool result);
46
47 content::BrowserContext* context_;
48
49 OfflinePageModel* offline_page_model_;
50
51 base::WeakPtrFactory<OfflinePageBookmarkObserver> weak_ptr_factory_;
52 };
53 } // namespace offline_pages
54
55 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BOOKMARK_OBSERVER_H _
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/android/offline_pages/offline_page_bookmark_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698