diff options
author | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 01:33:18 +0000 |
---|---|---|
committer | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 01:33:18 +0000 |
commit | ac9263642922463a82cb02f1ecd06c9536cc83e7 (patch) | |
tree | 8cf8349ee13e5f15f2c50d4437d8d7ecdb9a6752 /chrome/browser/views/toolbar_view.cc | |
parent | 0191afb579f359623cf31a956ec8d602057ffdcb (diff) | |
download | chromium_src-ac9263642922463a82cb02f1ecd06c9536cc83e7.zip chromium_src-ac9263642922463a82cb02f1ecd06c9536cc83e7.tar.gz chromium_src-ac9263642922463a82cb02f1ecd06c9536cc83e7.tar.bz2 |
Hide profiles behind a command-line switch since the user-data-dir stuff
wouldn't work on Mac.
See bug http://code.google.com/p/chromium/issues/detail?id=7987
Review URL: http://codereview.chromium.org/28093
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10432 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/toolbar_view.cc')
-rw-r--r-- | chrome/browser/views/toolbar_view.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc index 56195b4..2dc3858 100644 --- a/chrome/browser/views/toolbar_view.cc +++ b/chrome/browser/views/toolbar_view.cc @@ -6,6 +6,7 @@ #include <string> +#include "base/command_line.h" #include "base/logging.h" #include "base/path_service.h" #include "chrome/app/chrome_dll_resource.h" @@ -27,6 +28,7 @@ #include "chrome/browser/views/toolbar_star_toggle.h" #include "chrome/browser/view_ids.h" #include "chrome/common/chrome_constants.h" +#include "chrome/common/chrome_switches.h" #include "chrome/common/drag_drop_types.h" #include "chrome/common/l10n_util.h" #include "chrome/common/notification_service.h" @@ -582,9 +584,12 @@ void BrowserToolbarView::RunAppMenu(const CPoint& pt, HWND hwnd) { // Enumerate profiles asynchronously and then create the parent menu item. // We will create the child menu items for this once the asynchronous call is // done. See OnGetProfilesDone(). - profiles_helper_->GetProfiles(NULL); - profiles_menu_ = menu.AppendSubMenu(IDC_PROFILE_MENU, - l10n_util::GetString(IDS_PROFILE_MENU)); + const CommandLine& command_line = *CommandLine::ForCurrentProcess(); + if (command_line.HasSwitch(switches::kEnableUserDataDirProfiles)) { + profiles_helper_->GetProfiles(NULL); + profiles_menu_ = menu.AppendSubMenu(IDC_PROFILE_MENU, + l10n_util::GetString(IDS_PROFILE_MENU)); + } menu.AppendSeparator(); menu.AppendMenuItemWithLabel(IDC_SHOW_BOOKMARK_BAR, |