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

Unified Diff: chrome/browser/ui/webui/options2/browser_options_handler2.cc

Issue 9432003: Disable multi-profile UI in managed mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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
Index: chrome/browser/ui/webui/options2/browser_options_handler2.cc
diff --git a/chrome/browser/ui/webui/options2/browser_options_handler2.cc b/chrome/browser/ui/webui/options2/browser_options_handler2.cc
index 15bf0b1f2804cc1f6c305342bf3b2abef13b180e..ccf41407723df1f4d9fff6a6094e86fed269b8c6 100644
--- a/chrome/browser/ui/webui/options2/browser_options_handler2.cc
+++ b/chrome/browser/ui/webui/options2/browser_options_handler2.cc
@@ -1002,6 +1002,10 @@ void BrowserOptionsHandler::SendProfilesInfo() {
}
void BrowserOptionsHandler::CreateProfile(const ListValue* args) {
+ // This handler could have been called in managed mode, for example because
+ // the user fiddled with the web inspector. Silently return in this case.
+ if (g_browser_process->local_state()->GetBoolean(prefs::kInManagedMode))
sail 2012/03/06 19:12:50 use ProfileManager::IsMultipleProfilesEnabled() in
Bernhard Bauer 2012/03/06 19:29:41 Done.
+ return;
ProfileManager::CreateMultiProfileAsync();
}

Powered by Google App Engine
This is Rietveld 408576698