X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fbrowser%2Fsync%2Fglue%2Fbookmark_change_processor.h;h=cd86131f568f65bdb6b3a98c1633060088bb9dc4;hb=004985e17e624662a4c85c76a7654039dc83f028;hp=f0474b08586ac820ff13a834790c54d8adb1849c;hpb=2f108dbacb161091e42a3479f4e171339b7e7623;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/browser/sync/glue/bookmark_change_processor.h b/src/chrome/browser/sync/glue/bookmark_change_processor.h index f0474b0..cd86131 100644 --- a/src/chrome/browser/sync/glue/bookmark_change_processor.h +++ b/src/chrome/browser/sync/glue/bookmark_change_processor.h @@ -8,12 +8,15 @@ #include #include "base/compiler_specific.h" -#include "chrome/browser/bookmarks/bookmark_model_observer.h" #include "chrome/browser/sync/glue/bookmark_model_associator.h" -#include "chrome/browser/sync/glue/change_processor.h" #include "chrome/browser/sync/glue/sync_backend_host.h" +#include "components/bookmarks/core/browser/bookmark_model_observer.h" +#include "components/bookmarks/core/browser/bookmark_node.h" +#include "components/sync_driver/change_processor.h" #include "components/sync_driver/data_type_error_handler.h" +class Profile; + namespace base { class RefCountedMemory; } @@ -32,7 +35,8 @@ namespace browser_sync { class BookmarkChangeProcessor : public BookmarkModelObserver, public ChangeProcessor { public: - BookmarkChangeProcessor(BookmarkModelAssociator* model_associator, + BookmarkChangeProcessor(Profile* profile, + BookmarkModelAssociator* model_associator, DataTypeErrorHandler* error_handler); virtual ~BookmarkChangeProcessor(); @@ -52,8 +56,11 @@ class BookmarkChangeProcessor : public BookmarkModelObserver, virtual void BookmarkNodeRemoved(BookmarkModel* model, const BookmarkNode* parent, int index, - const BookmarkNode* node) OVERRIDE; - virtual void BookmarkAllNodesRemoved(BookmarkModel* model) OVERRIDE; + const BookmarkNode* node, + const std::set& removed_urls) OVERRIDE; + virtual void BookmarkAllNodesRemoved( + BookmarkModel* model, + const std::set& removed_urls) OVERRIDE; virtual void BookmarkNodeChanged(BookmarkModel* model, const BookmarkNode* node) OVERRIDE; virtual void BookmarkMetaInfoChanged(BookmarkModel* model, @@ -134,7 +141,7 @@ class BookmarkChangeProcessor : public BookmarkModelObserver, const std::vector& nodes); protected: - virtual void StartImpl(Profile* profile) OVERRIDE; + virtual void StartImpl() OVERRIDE; private: enum MoveOrCreate { @@ -142,10 +149,9 @@ class BookmarkChangeProcessor : public BookmarkModelObserver, CREATE, }; - // Sets the meta info of the given bookmark node from the given sync node. - static void SetBookmarkMetaInfo(const syncer::BaseNode* sync_node, - const BookmarkNode* bookmark_node, - BookmarkModel* bookmark_model); + // Retrieves the meta info from the given sync node. + static scoped_ptr GetBookmarkMetaInfo( + const syncer::BaseNode* sync_node); // Sets the meta info of the given sync node from the given bookmark node. static void SetSyncNodeMetaInfo(const BookmarkNode* node,