| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.h" | 5 #include "chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.h" |
| 6 | 6 |
| 7 #include "base/macros.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 9 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 9 #include "chrome/browser/bookmarks/bookmark_stats.h" | 10 #include "chrome/browser/bookmarks/bookmark_stats.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/test/base/browser_with_test_window_test.h" | 12 #include "chrome/test/base/browser_with_test_window_test.h" |
| 12 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
| 13 #include "components/bookmarks/browser/bookmark_model.h" | 14 #include "components/bookmarks/browser/bookmark_model.h" |
| 14 #include "components/bookmarks/test/bookmark_test_helpers.h" | 15 #include "components/bookmarks/test/bookmark_test_helpers.h" |
| 15 #include "ui/views/controls/menu/menu_item_view.h" | 16 #include "ui/views/controls/menu/menu_item_view.h" |
| 16 #include "ui/views/controls/menu/menu_runner.h" | 17 #include "ui/views/controls/menu/menu_runner.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 bookmark_menu_delegate_->Init(&test_delegate, NULL, node, 0, | 180 bookmark_menu_delegate_->Init(&test_delegate, NULL, node, 0, |
| 180 BookmarkMenuDelegate::HIDE_PERMANENT_FOLDERS, | 181 BookmarkMenuDelegate::HIDE_PERMANENT_FOLDERS, |
| 181 BOOKMARK_LAUNCH_LOCATION_NONE); | 182 BOOKMARK_LAUNCH_LOCATION_NONE); |
| 182 LoadAllMenus(); | 183 LoadAllMenus(); |
| 183 std::vector<const BookmarkNode*> nodes_to_remove; | 184 std::vector<const BookmarkNode*> nodes_to_remove; |
| 184 nodes_to_remove.push_back(node->GetChild(1)); | 185 nodes_to_remove.push_back(node->GetChild(1)); |
| 185 bookmark_menu_delegate_->WillRemoveBookmarks(nodes_to_remove); | 186 bookmark_menu_delegate_->WillRemoveBookmarks(nodes_to_remove); |
| 186 nodes_to_remove.clear(); | 187 nodes_to_remove.clear(); |
| 187 bookmark_menu_delegate_->DidRemoveBookmarks(); | 188 bookmark_menu_delegate_->DidRemoveBookmarks(); |
| 188 } | 189 } |
| OLD | NEW |