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

Unified Diff: chrome/browser/sync/glue/bookmark_model_associator.h

Issue 865163003: bookmarks: Move BookmarkNode into 'bookmarks' namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enhanced_bookmarks fix Created 5 years, 10 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/sync/glue/bookmark_model_associator.h
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.h b/chrome/browser/sync/glue/bookmark_model_associator.h
index 2820597169e04c03d88f4311f76a083835f4866d..ad1ff71b43c3eacb0dbdf81ec2fb131ba51210b0 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.h
+++ b/chrome/browser/sync/glue/bookmark_model_associator.h
@@ -17,11 +17,11 @@
#include "components/sync_driver/model_associator.h"
#include "sync/internal_api/public/util/unrecoverable_error_handler.h"
-class BookmarkNode;
class Profile;
namespace bookmarks {
class BookmarkModel;
+class BookmarkNode;
}
namespace syncer {
@@ -37,7 +37,8 @@ namespace browser_sync {
// * Methods to get a bookmark node for a given sync node and vice versa.
// * Persisting model associations and loading them back.
class BookmarkModelAssociator
- : public sync_driver::PerDataTypeAssociatorInterface<BookmarkNode, int64> {
+ : public sync_driver::
+ PerDataTypeAssociatorInterface<bookmarks::BookmarkNode, int64> {
public:
static syncer::ModelType model_type() { return syncer::BOOKMARKS; }
// |expect_mobile_bookmarks_folder| controls whether or not we
@@ -80,7 +81,8 @@ class BookmarkModelAssociator
// Returns the bookmark node for the given sync id.
// Returns NULL if no bookmark node is found for the given sync id.
- const BookmarkNode* GetChromeNodeFromSyncId(int64 sync_id) override;
+ const bookmarks::BookmarkNode* GetChromeNodeFromSyncId(
+ int64 sync_id) override;
// Initializes the given sync node from the given bookmark node id.
// Returns false if no sync node was found for the given bookmark node id or
@@ -89,7 +91,7 @@ class BookmarkModelAssociator
syncer::BaseNode* sync_node) override;
// Associates the given bookmark node with the given sync id.
- void Associate(const BookmarkNode* node, int64 sync_id) override;
+ void Associate(const bookmarks::BookmarkNode* node, int64 sync_id) override;
// Remove the association that corresponds to the given sync id.
void Disassociate(int64 sync_id) override;
@@ -109,7 +111,8 @@ class BookmarkModelAssociator
private:
typedef std::map<int64, int64> BookmarkIdToSyncIdMap;
- typedef std::map<int64, const BookmarkNode*> SyncIdToBookmarkNodeMap;
+ typedef std::map<int64, const bookmarks::BookmarkNode*>
+ SyncIdToBookmarkNodeMap;
typedef std::set<int64> DirtyAssociationsSyncIds;
// Posts a task to persist dirty associations.
@@ -134,11 +137,11 @@ class BookmarkModelAssociator
// Bookmarks folder. The sync nodes are server-created.
// Returns true on success, false if association failed.
bool AssociateTaggedPermanentNode(
- const BookmarkNode* permanent_node,
+ const bookmarks::BookmarkNode* permanent_node,
const std::string& tag) WARN_UNUSED_RESULT;
// Compare the properties of a pair of nodes from either domain.
- bool NodesMatch(const BookmarkNode* bookmark,
+ bool NodesMatch(const bookmarks::BookmarkNode* bookmark,
const syncer::BaseNode* sync_node) const;
// Check whether bookmark model and sync model are synced by comparing

Powered by Google App Engine
This is Rietveld 408576698