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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 668773002: [Win] The new profiles UI: now at an immersive mode near you (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: + curlies Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 Profile* profile = Profile::FromWebUI(web_ui()); 1032 Profile* profile = Profile::FromWebUI(web_ui());
1033 return !profile->IsGuestSession(); 1033 return !profile->IsGuestSession();
1034 #endif 1034 #endif
1035 } 1035 }
1036 1036
1037 bool BrowserOptionsHandler::ShouldShowMultiProfilesUserList() { 1037 bool BrowserOptionsHandler::ShouldShowMultiProfilesUserList() {
1038 #if defined(OS_CHROMEOS) 1038 #if defined(OS_CHROMEOS)
1039 // On Chrome OS we use different UI for multi-profiles. 1039 // On Chrome OS we use different UI for multi-profiles.
1040 return false; 1040 return false;
1041 #else 1041 #else
1042 if (helper::GetDesktopType(web_ui()) != chrome::HOST_DESKTOP_TYPE_NATIVE) 1042 chrome::HostDesktopType desktop_type = helper::GetDesktopType(web_ui());
1043 if (desktop_type != chrome::HOST_DESKTOP_TYPE_NATIVE &&
msw 2014/10/21 19:54:38 What? I don't think there is any other desktop typ
noms (inactive) 2014/10/21 20:55:18 Oh, yeah, you're totally right. I misread that enu
1044 desktop_type != chrome::HOST_DESKTOP_TYPE_ASH) {
1043 return false; 1045 return false;
1046 }
1044 Profile* profile = Profile::FromWebUI(web_ui()); 1047 Profile* profile = Profile::FromWebUI(web_ui());
1045 if (profile->IsGuestSession()) 1048 if (profile->IsGuestSession())
1046 return false; 1049 return false;
1047 return profiles::IsMultipleProfilesEnabled(); 1050 return profiles::IsMultipleProfilesEnabled();
1048 #endif 1051 #endif
1049 } 1052 }
1050 1053
1051 bool BrowserOptionsHandler::ShouldAllowAdvancedSettings() { 1054 bool BrowserOptionsHandler::ShouldAllowAdvancedSettings() {
1052 #if defined(OS_CHROMEOS) 1055 #if defined(OS_CHROMEOS)
1053 // ChromeOS handles guest-mode restrictions in a different manner. 1056 // ChromeOS handles guest-mode restrictions in a different manner.
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
1976 1979
1977 void BrowserOptionsHandler::SetMetricsReportingCheckbox(bool checked, 1980 void BrowserOptionsHandler::SetMetricsReportingCheckbox(bool checked,
1978 bool disabled) { 1981 bool disabled) {
1979 web_ui()->CallJavascriptFunction( 1982 web_ui()->CallJavascriptFunction(
1980 "BrowserOptions.setMetricsReportingCheckboxState", 1983 "BrowserOptions.setMetricsReportingCheckboxState",
1981 base::FundamentalValue(checked), 1984 base::FundamentalValue(checked),
1982 base::FundamentalValue(disabled)); 1985 base::FundamentalValue(disabled));
1983 } 1986 }
1984 1987
1985 } // namespace options 1988 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698