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

Unified Diff: components/offline_pages/offline_page_bookmark_observer.cc

Issue 2185973003: [Offline Pages] Delete associated page along with bookmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unintended changes. 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: components/offline_pages/offline_page_bookmark_observer.cc
diff --git a/components/offline_pages/offline_page_bookmark_observer.cc b/components/offline_pages/offline_page_bookmark_observer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7c84afc9223b8f5162d81cadc7db16741e790cda
--- /dev/null
+++ b/components/offline_pages/offline_page_bookmark_observer.cc
@@ -0,0 +1,28 @@
+// 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.
+
+#include "components/offline_pages/offline_page_bookmark_observer.h"
+
+#include "components/bookmarks/browser/base_bookmark_model_observer.h"
+#include "components/bookmarks/browser/bookmark_node.h"
+#include "components/offline_pages/offline_page_model.h"
+
+namespace offline_pages {
+
+OfflinePageBookmarkObserver::OfflinePageBookmarkObserver(
+ OfflinePageModel* model)
+ : model_(model) {}
+
+void OfflinePageBookmarkObserver::BookmarkModelChanged() {}
+
+void OfflinePageBookmarkObserver::BookmarkNodeRemoved(
+ bookmarks::BookmarkModel* model,
+ const bookmarks::BookmarkNode* parent,
+ int old_index,
+ const bookmarks::BookmarkNode* node,
+ const std::set<GURL>& removed_urls) {
+ model_->ExpireRemovedBookmarkPage(node);
+}
+
+} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698