diff options
-rw-r--r-- | chrome/browser/bookmarks/bookmark_context_menu_controller.cc | 10 | ||||
-rw-r--r-- | chrome/browser/views/bookmark_context_menu_controller_views.cc | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/chrome/browser/bookmarks/bookmark_context_menu_controller.cc b/chrome/browser/bookmarks/bookmark_context_menu_controller.cc index 007aeba..7e9162a 100644 --- a/chrome/browser/bookmarks/bookmark_context_menu_controller.cc +++ b/chrome/browser/bookmarks/bookmark_context_menu_controller.cc @@ -10,6 +10,8 @@ #include "chrome/browser/bookmarks/bookmark_manager.h" #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/bookmarks/bookmark_utils.h" +#include "chrome/browser/browser.h" +#include "chrome/browser/browser_list.h" #include "chrome/browser/input_window_dialog.h" #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/pref_service.h" @@ -397,7 +399,13 @@ void BookmarkContextMenuController::ExecuteCommand(int id) { case IDS_BOOKMARK_MANAGER: UserMetrics::RecordAction("ShowBookmarkManager", profile_); - BookmarkManager::Show(profile_); + { + Browser* browser = BrowserList::GetLastActiveWithProfile(profile_); + if (browser) + browser->OpenBookmarkManager(); + else + NOTREACHED(); + } break; case IDS_BOOKMARK_MANAGER_SORT: diff --git a/chrome/browser/views/bookmark_context_menu_controller_views.cc b/chrome/browser/views/bookmark_context_menu_controller_views.cc index edbf9bd..9b8a8e8 100644 --- a/chrome/browser/views/bookmark_context_menu_controller_views.cc +++ b/chrome/browser/views/bookmark_context_menu_controller_views.cc @@ -10,6 +10,8 @@ #include "chrome/browser/bookmarks/bookmark_manager.h" #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/bookmarks/bookmark_utils.h" +#include "chrome/browser/browser.h" +#include "chrome/browser/browser_list.h" #include "chrome/browser/input_window_dialog.h" #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/pref_service.h" @@ -381,7 +383,13 @@ void BookmarkContextMenuControllerViews::ExecuteCommand(int id) { case IDS_BOOKMARK_MANAGER: UserMetrics::RecordAction("ShowBookmarkManager", profile_); - BookmarkManager::Show(profile_); + { + Browser* browser = BrowserList::GetLastActiveWithProfile(profile_); + if (browser) + browser->OpenBookmarkManager(); + else + NOTREACHED(); + } break; case IDS_BOOKMARK_MANAGER_SORT: |