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

Unified 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: Removing debug lines. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/offline_pages/offline_page_bookmark_observer.h
diff --git a/chrome/browser/android/offline_pages/offline_page_bookmark_observer.h b/chrome/browser/android/offline_pages/offline_page_bookmark_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..945b222fe74aef29d72799cca17b5f600336e87b
--- /dev/null
+++ b/chrome/browser/android/offline_pages/offline_page_bookmark_observer.h
@@ -0,0 +1,49 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BOOKMARK_OBSERVER_H_
+#define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BOOKMARK_OBSERVER_H_
+
+#include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
+
+#include "components/bookmarks/browser/owned_bookmark_model_observer.h"
+#include "components/offline_pages/offline_page_types.h"
+
+class GURL;
+class Profile;
+
+namespace bookmarks {
+class BookmarkModel;
+class BookmarkNode;
+}
+
+namespace offline_pages {
+
+class OfflinePageBookmarkObserver
+ : public bookmarks::OwnedBookmarkModelObserver {
+ public:
+ explicit OfflinePageBookmarkObserver(Profile* profile);
+
+ ~OfflinePageBookmarkObserver() override {}
+
+ void BookmarkModelChanged() override {}
Dmitry Titov 2016/08/26 23:08:59 no need to override this. Also, we typically group
romax 2016/08/29 22:58:02 Done.
+
+ void BookmarkNodeRemoved(bookmarks::BookmarkModel* model,
+ const bookmarks::BookmarkNode* parent,
+ int old_index,
+ const bookmarks::BookmarkNode* node,
+ const std::set<GURL>& removed_urls) override;
+
+ void DoExpireRemovedBookmarkPages(const MultipleOfflineIdResult& offline_ids);
+
+ void OnExpireRemovedBookmarkPagesDone(bool result);
+
+ private:
+ Profile* profile_;
+
+ OfflinePageModel* offline_page_model_;
Dmitry Titov 2016/08/26 23:08:59 What is a lifetime of that? What if the OPM is des
romax 2016/08/29 22:58:02 The OPM itself should be independent, and if we de
+};
+} // namespace offline_pages
+
+#endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BOOKMARK_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698