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

Unified Diff: chrome/browser/android/offline_pages/external_listener_impl.cc

Issue 2185973003: [Offline Pages] Delete associated page along with bookmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding offline_pages::ExternalListener. 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/external_listener_impl.cc
diff --git a/chrome/browser/android/offline_pages/external_listener_impl.cc b/chrome/browser/android/offline_pages/external_listener_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..50b99c439da8fc15aa98d0aa0968f4c82d08b970
--- /dev/null
+++ b/chrome/browser/android/offline_pages/external_listener_impl.cc
@@ -0,0 +1,26 @@
+// 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 "chrome/browser/android/offline_pages/external_listener_impl.h"
+
+#include "chrome/browser/profiles/profile.h"
+#include "components/offline_pages/offline_page_model.h"
+
+namespace offline_pages {
+
+ExternalListenerImpl::ExternalListenerImpl(Profile* profile)
+ : profile_(profile) {}
+
+void ExternalListenerImpl::BookmarkNodeRemoved(
+ bookmarks::BookmarkModel* model,
+ const bookmarks::BookmarkNode* parent,
+ int old_index,
+ const bookmarks::BookmarkNode* node,
+ const std::set<GURL>& removed_urls) {
+ OfflinePageModel* offline_page_model =
+ OfflinePageModelFactory::GetForBrowserContext(profile_);
+ offline_page_model->ExpireRemovedBookmarkPage(node);
+}
+
+} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698