Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6871)

Unified Diff: chrome/browser/views/toolbar_view.cc

Issue 28093: Hide profiles behind a command-line switch since the user-data-dir stuff... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/user_data_manager.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/toolbar_view.cc
===================================================================
--- chrome/browser/views/toolbar_view.cc (revision 10203)
+++ chrome/browser/views/toolbar_view.cc (working copy)
@@ -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"
@@ -556,9 +558,12 @@
// 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,
« no previous file with comments | « chrome/browser/user_data_manager.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698