Chromium Code Reviews| Index: chrome/browser/ui/webui/options/browser_options_handler.cc |
| diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc |
| index 5be4f546fee5583b6d09a5880da2d90686fcdcbf..6827ca578f1545c9104ae8b43685dd5d7c2bd88b 100644 |
| --- a/chrome/browser/ui/webui/options/browser_options_handler.cc |
| +++ b/chrome/browser/ui/webui/options/browser_options_handler.cc |
| @@ -1573,10 +1573,10 @@ void BrowserOptionsHandler::SetupAccessibilityFeatures() { |
| #endif |
| void BrowserOptionsHandler::SetupMetricsReportingSettingVisibility() { |
| -#if defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) |
| +#if defined(GOOGLE_CHROME_BUILD) |
| // Don't show the reporting setting if we are in the guest mode. |
| - if (CommandLine::ForCurrentProcess()->HasSwitch( |
| - chromeos::switches::kGuestSession)) { |
| + Profile* profile = Profile::FromWebUI(web_ui()); |
|
msw
2014/02/15 00:30:52
nit: inline this in the if statement below.
bcwhite
2014/02/18 15:19:36
Done.
|
| + if (profile->IsGuestSession()) { |
| base::FundamentalValue visible(false); |
| web_ui()->CallJavascriptFunction( |
| "BrowserOptions.setMetricsReportingSettingVisibility", visible); |