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

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

Issue 13671005: Re-apply 192420: Move login switches to src/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
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/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 #include "ui/webui/web_ui_util.h" 82 #include "ui/webui/web_ui_util.h"
83 83
84 #if defined(ENABLE_MANAGED_USERS) 84 #if defined(ENABLE_MANAGED_USERS)
85 #include "chrome/browser/managed_mode/managed_user_service.h" 85 #include "chrome/browser/managed_mode/managed_user_service.h"
86 #include "chrome/browser/managed_mode/managed_user_service_factory.h" 86 #include "chrome/browser/managed_mode/managed_user_service_factory.h"
87 #endif 87 #endif
88 88
89 #if !defined(OS_CHROMEOS) 89 #if !defined(OS_CHROMEOS)
90 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" 90 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h"
91 #include "chrome/browser/ui/webui/options/advanced_options_utils.h" 91 #include "chrome/browser/ui/webui/options/advanced_options_utils.h"
92 #include "chromeos/chromeos_switches.h"
92 #endif 93 #endif
93 94
94 #if defined(OS_CHROMEOS) 95 #if defined(OS_CHROMEOS)
95 #include "ash/magnifier/magnifier_constants.h" 96 #include "ash/magnifier/magnifier_constants.h"
96 #include "base/chromeos/chromeos_version.h" 97 #include "base/chromeos/chromeos_version.h"
97 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 98 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
98 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h" 99 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h"
99 #include "chrome/browser/chromeos/login/user_manager.h" 100 #include "chrome/browser/chromeos/login/user_manager.h"
100 #include "chrome/browser/chromeos/settings/cros_settings.h" 101 #include "chrome/browser/chromeos/settings/cros_settings.h"
101 #include "chrome/browser/policy/browser_policy_connector.h" 102 #include "chrome/browser/policy/browser_policy_connector.h"
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled)); 1412 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled));
1412 web_ui()->CallJavascriptFunction( 1413 web_ui()->CallJavascriptFunction(
1413 "BrowserOptions.setVirtualKeyboardCheckboxState", 1414 "BrowserOptions.setVirtualKeyboardCheckboxState",
1414 virtual_keyboard_enabled); 1415 virtual_keyboard_enabled);
1415 } 1416 }
1416 #endif 1417 #endif
1417 1418
1418 void BrowserOptionsHandler::SetupMetricsReportingSettingVisibility() { 1419 void BrowserOptionsHandler::SetupMetricsReportingSettingVisibility() {
1419 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) 1420 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS)
1420 // Don't show the reporting setting if we are in the guest mode. 1421 // Don't show the reporting setting if we are in the guest mode.
1421 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) { 1422 if (CommandLine::ForCurrentProcess()->HasSwitch(
1423 chromeos::switches::kGuestSession)) {
1422 base::FundamentalValue visible(false); 1424 base::FundamentalValue visible(false);
1423 web_ui()->CallJavascriptFunction( 1425 web_ui()->CallJavascriptFunction(
1424 "BrowserOptions.setMetricsReportingSettingVisibility", visible); 1426 "BrowserOptions.setMetricsReportingSettingVisibility", visible);
1425 } 1427 }
1426 #endif 1428 #endif
1427 } 1429 }
1428 1430
1429 void BrowserOptionsHandler::SetupPasswordGenerationSettingVisibility() { 1431 void BrowserOptionsHandler::SetupPasswordGenerationSettingVisibility() {
1430 base::FundamentalValue visible( 1432 base::FundamentalValue visible(
1431 CommandLine::ForCurrentProcess()->HasSwitch( 1433 CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || 1502 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() ||
1501 is_extension_controlled); 1503 is_extension_controlled);
1502 base::FundamentalValue extension_controlled(is_extension_controlled); 1504 base::FundamentalValue extension_controlled(is_extension_controlled);
1503 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", 1505 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection",
1504 disabled, extension_controlled); 1506 disabled, extension_controlled);
1505 1507
1506 #endif // !defined(OS_CHROMEOS) 1508 #endif // !defined(OS_CHROMEOS)
1507 } 1509 }
1508 1510
1509 } // namespace options 1511 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698