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

Unified Diff: components/enhanced_bookmarks/enhanced_bookmark_model_observer.h

Issue 563363002: Only set remote id during url node creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: components/enhanced_bookmarks/enhanced_bookmark_model_observer.h
diff --git a/components/enhanced_bookmarks/enhanced_bookmark_model_observer.h b/components/enhanced_bookmarks/enhanced_bookmark_model_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..5ebfa16e41795c1e2cf0ece7fbaa69c5e1332b2d
--- /dev/null
+++ b/components/enhanced_bookmarks/enhanced_bookmark_model_observer.h
@@ -0,0 +1,43 @@
+// Copyright 2014 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 COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_
+#define COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_
+
+#include <string>
+
+class BookmarkNode;
+
+namespace enhanced_bookmarks {
+
+class EnhancedBookmarkModelObserver {
+ public:
+ // Called when the model has finished loading.
+ virtual void EnhancedBookmarkModelLoaded() = 0;
+
+ // Called from EnhancedBookmarkModel::ShutDown.
+ virtual void EnhancedBookmarkModelShuttingDown() = 0;
+
+ // Called when a node is added to the model.
+ virtual void EnhancedBookmarkAdded(const BookmarkNode* node) = 0;
+
+ // Called when a node is removed from the model.
+ virtual void EnhancedBookmarkRemoved(const BookmarkNode* node) = 0;
+
+ // Called when all user editable nodes are removed from the model.
+ virtual void EnhancedBookmarkAllUserNodesRemoved() = 0;
+
+ // Called when the remote id of a node changes. If |remote_id| is empty, the
+ // remote id has been cleared. This could happen if multiple nodes with the
+ // same remote id has been detected.
+ virtual void EnhancedBookmarkRemoteIdChanged(const BookmarkNode* node,
+ const std::string& old_remote_id,
+ const std::string& remote_id) {};
+
+ protected:
+ virtual ~EnhancedBookmarkModelObserver() {}
+};
+
+} // namespace enhanced_bookmarks
+#endif // COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698