Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / bookmarks / bookmark_drag_drop.cc
index af174f5..7aeb364 100644 (file)
@@ -4,13 +4,14 @@
 
 #include "chrome/browser/ui/bookmarks/bookmark_drag_drop.h"
 
-#include "chrome/browser/bookmarks/bookmark_model.h"
 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
-#include "chrome/browser/bookmarks/bookmark_node_data.h"
-#include "chrome/browser/bookmarks/bookmark_utils.h"
-#include "chrome/browser/bookmarks/scoped_group_bookmark_actions.h"
+#include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/undo/bookmark_undo_service.h"
 #include "chrome/browser/undo/bookmark_undo_service_factory.h"
+#include "components/bookmarks/core/browser/bookmark_model.h"
+#include "components/bookmarks/core/browser/bookmark_node_data.h"
+#include "components/bookmarks/core/browser/bookmark_utils.h"
+#include "components/bookmarks/core/browser/scoped_group_bookmark_actions.h"
 #include "ui/base/dragdrop/drag_drop_types.h"
 
 namespace chrome {
@@ -19,13 +20,13 @@ int DropBookmarks(Profile* profile,
                   const BookmarkNodeData& data,
                   const BookmarkNode* parent_node,
                   int index) {
+  BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile);
 #if !defined(OS_ANDROID)
-  ScopedGroupBookmarkActions group_drops(profile);
+  ScopedGroupBookmarkActions group_drops(model);
 #endif
-  BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile);
-  if (data.IsFromProfile(profile)) {
+  if (data.IsFromProfilePath(profile->GetPath())) {
     const std::vector<const BookmarkNode*> dragged_nodes =
-        data.GetNodes(profile);
+        data.GetNodes(model, profile->GetPath());
     if (!dragged_nodes.empty()) {
       // Drag from same profile. Move nodes.
       for (size_t i = 0; i < dragged_nodes.size(); ++i) {