Chromium Code Reviews| 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 5d557d6b2731fdd3aef4a0371f950fefef013958..dc58169b1a23df2051f8c59b85e431fedde0609e 100644 |
| --- a/chrome/browser/ui/webui/options2/browser_options_handler2.cc |
| +++ b/chrome/browser/ui/webui/options2/browser_options_handler2.cc |
| @@ -652,11 +652,15 @@ void BrowserOptionsHandler::OnResultChanged(bool default_match_changed) { |
| void BrowserOptionsHandler::SendProfilesInfo() { |
| // Set profile creation text and button if multi-profiles switch is on. |
| - scoped_ptr<Value> visible(Value::CreateBooleanValue(multiprofile_)); |
| + bool profiles_section_visible = multiprofile_ && |
| + !g_browser_process->local_state()->GetBoolean(prefs::kInManagedMode); |
| + |
| + scoped_ptr<Value> visible( |
| + Value::CreateBooleanValue(profiles_section_visible)); |
| web_ui()->CallJavascriptFunction("BrowserOptions.setProfilesSectionVisible", |
| *visible); |
| - if (!multiprofile_) |
| + if (!profiles_section_visible) |
| return; |
| ProfileInfoCache& cache = |
| @@ -693,6 +697,10 @@ void BrowserOptionsHandler::SendProfilesInfo() { |
| } |
| void BrowserOptionsHandler::CreateProfile(const ListValue* args) { |
| + if (!g_browser_process->local_state()->GetBoolean(prefs::kInManagedMode)) { |
|
Joao da Silva
2012/02/23 12:05:14
Is this really a !InManagedMode?
Bernhard Bauer
2012/02/23 12:14:36
Yeah, that's backwards :-D
|
| + NOTREACHED(); |
| + return; |
| + } |
| ProfileManager::CreateMultiProfileAsync(); |
| } |