diff options
50 files changed, 140 insertions, 221 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 49ea664..e5ba392 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -78,7 +78,6 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/user_manager.h" -#include "chromeos/chromeos_switches.h" #endif // defined(OS_CHROMEOS) using WebKit::WebFindOptions; @@ -217,8 +216,7 @@ bool AutomationProvider::InitializeChannel(const std::string& channel_id) { if (use_initial_load_observers_) { // Wait for webui login to be ready. // Observer will delete itself. - if (CommandLine::ForCurrentProcess()->HasSwitch( - chromeos::switches::kLoginManager) && + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginManager) && !chromeos::UserManager::Get()->IsUserLoggedIn()) { login_webui_ready_ = false; new OOBEWebuiReadyObserver(this); diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index a8abe15..031caf0 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc @@ -159,7 +159,6 @@ #include "chrome/browser/chromeos/cros/cros_library.h" #include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/cros_settings_names.h" -#include "chromeos/chromeos_switches.h" #endif // TODO(port): several win-only methods have been pulled out of this, but @@ -320,7 +319,7 @@ PrefService* InitializeLocalState( } #if defined(OS_CHROMEOS) - if (parsed_command_line.HasSwitch(chromeos::switches::kLoginManager)) { + if (parsed_command_line.HasSwitch(switches::kLoginManager)) { std::string owner_locale = local_state->GetString(prefs::kOwnerLocale); // Ensure that we start with owner's locale. if (!owner_locale.empty() && diff --git a/chrome/browser/chrome_browser_main_linux.cc b/chrome/browser/chrome_browser_main_linux.cc index 870a95c..6081681c 100644 --- a/chrome/browser/chrome_browser_main_linux.cc +++ b/chrome/browser/chrome_browser_main_linux.cc @@ -24,7 +24,6 @@ #include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/cros_settings_names.h" #include "chrome/common/chrome_version_info.h" -#include "chromeos/chromeos_switches.h" #endif #endif // defined(USE_LINUX_BREAKPAD) @@ -61,8 +60,8 @@ bool IsCrashReportingEnabled(const PrefService* local_state) { bool breakpad_enabled = false; if (is_chrome_build) { #if defined(OS_CHROMEOS) - bool is_guest_session = CommandLine::ForCurrentProcess()->HasSwitch( - chromeos::switches::kGuestSession); + bool is_guest_session = + CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession); bool is_stable_channel = chrome::VersionInfo::GetChannel() == chrome::VersionInfo::CHANNEL_STABLE; diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index c7821c1..f0deebc 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -134,7 +134,6 @@ #elif defined(OS_CHROMEOS) #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" #include "chrome/browser/chromeos/login/user_manager.h" -#include "chromeos/chromeos_switches.h" #elif defined(OS_LINUX) #include "chrome/browser/chrome_browser_main_linux.h" #elif defined(OS_ANDROID) @@ -1108,11 +1107,9 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); #if defined(OS_CHROMEOS) const std::string& login_profile = - browser_command_line.GetSwitchValueASCII( - chromeos::switches::kLoginProfile); + browser_command_line.GetSwitchValueASCII(switches::kLoginProfile); if (!login_profile.empty()) - command_line->AppendSwitchASCII( - chromeos::switches::kLoginProfile, login_profile); + command_line->AppendSwitchASCII(switches::kLoginProfile, login_profile); #endif content::RenderProcessHost* process = @@ -1220,9 +1217,9 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( arraysize(kSwitchNames)); } else if (process_type == switches::kPluginProcess) { static const char* const kSwitchNames[] = { -#if defined(OS_CHROMEOS) - chromeos::switches::kLoginProfile, -#endif + #if defined(OS_CHROMEOS) + switches::kLoginProfile, + #endif switches::kMemoryProfiling, switches::kSilentDumpOnDCHECK, switches::kUserDataDir, diff --git a/chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc b/chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc index 1e394abf..82e9a6c 100644 --- a/chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc +++ b/chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc @@ -20,7 +20,6 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_profile.h" -#include "chromeos/chromeos_switches.h" #include "components/user_prefs/user_prefs.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_service.h" diff --git a/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc b/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc index b272a08..b9b81cf 100644 --- a/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc +++ b/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc @@ -19,7 +19,6 @@ #include "chrome/browser/ui/chrome_pages.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.h" -#include "chromeos/chromeos_switches.h" #include "content/public/browser/notification_service.h" namespace chromeos { @@ -61,9 +60,9 @@ class UserWallpaperDelegate : public ash::UserWallpaperDelegate { bool is_registered = WizardController::IsDeviceRegistered(); const CommandLine* command_line = CommandLine::ForCurrentProcess(); bool disable_boot_animation = command_line-> - HasSwitch(::switches::kDisableBootAnimation); + HasSwitch(switches::kDisableBootAnimation); bool disable_oobe_animation = command_line-> - HasSwitch(::switches::kDisableOobeAnimation); + HasSwitch(switches::kDisableOobeAnimation); if ((!is_registered && disable_oobe_animation) || (is_registered && disable_boot_animation)) return false; diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc index ecf74e8..e94bd9c 100644 --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc @@ -192,19 +192,20 @@ class StubLogin : public LoginStatusConsumer, bool ShouldAutoLaunchKioskApp(const CommandLine& command_line) { KioskAppManager* app_manager = KioskAppManager::Get(); return !command_line.HasSwitch(::switches::kDisableAppMode) && - command_line.HasSwitch(switches::kLoginManager) && - !command_line.HasSwitch(switches::kForceLoginManagerInTests) && + command_line.HasSwitch(::switches::kLoginManager) && + !command_line.HasSwitch(::switches::kForceLoginManagerInTests) && !app_manager->GetAutoLaunchApp().empty() && KioskAppLaunchError::Get() == KioskAppLaunchError::NONE; } void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line, Profile* profile) { - if (parsed_command_line.HasSwitch(switches::kLoginManager)) { + if (parsed_command_line.HasSwitch(::switches::kLoginManager)) { std::string first_screen = - parsed_command_line.GetSwitchValueASCII(switches::kLoginScreen); + parsed_command_line.GetSwitchValueASCII(::switches::kLoginScreen); std::string size_arg = - parsed_command_line.GetSwitchValueASCII(switches::kLoginScreenSize); + parsed_command_line.GetSwitchValueASCII( + ::switches::kLoginScreenSize); gfx::Size size(0, 0); // Allow the size of the login window to be set explicitly. If not set, // default to the entire screen. This is mostly useful for testing. @@ -233,12 +234,12 @@ void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line, local_state->ClearPref(prefs::kRebootAfterUpdate); } } - } else if (parsed_command_line.HasSwitch(switches::kLoginUser) && - parsed_command_line.HasSwitch(switches::kLoginPassword)) { + } else if (parsed_command_line.HasSwitch(::switches::kLoginUser) && + parsed_command_line.HasSwitch(::switches::kLoginPassword)) { BootTimesLoader::Get()->RecordLoginAttempted(); new StubLogin( - parsed_command_line.GetSwitchValueASCII(switches::kLoginUser), - parsed_command_line.GetSwitchValueASCII(switches::kLoginPassword)); + parsed_command_line.GetSwitchValueASCII(::switches::kLoginUser), + parsed_command_line.GetSwitchValueASCII(::switches::kLoginPassword)); } else { if (!parsed_command_line.HasSwitch(::switches::kTestName)) { // We did not log in (we crashed or are debugging), so we need to @@ -386,7 +387,7 @@ ChromeBrowserMainPartsChromeos::~ChromeBrowserMainPartsChromeos() { void ChromeBrowserMainPartsChromeos::PreEarlyInitialization() { CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); - if (parsed_command_line().HasSwitch(switches::kGuestSession)) { + if (parsed_command_line().HasSwitch(::switches::kGuestSession)) { // Disable sync and extensions if we're in "browse without sign-in" mode. singleton_command_line->AppendSwitch(::switches::kDisableSync); singleton_command_line->AppendSwitch(::switches::kDisableExtensions); @@ -397,19 +398,19 @@ void ChromeBrowserMainPartsChromeos::PreEarlyInitialization() { // showing the login manager or attempting a command line login, login with a // stub user. if (!base::chromeos::IsRunningOnChromeOS() && - !parsed_command_line().HasSwitch(switches::kLoginManager) && - !parsed_command_line().HasSwitch(switches::kLoginUser) && - !parsed_command_line().HasSwitch(switches::kGuestSession)) { + !parsed_command_line().HasSwitch(::switches::kLoginManager) && + !parsed_command_line().HasSwitch(::switches::kLoginUser) && + !parsed_command_line().HasSwitch(::switches::kGuestSession)) { singleton_command_line->AppendSwitchASCII( - switches::kLoginUser, UserManager::kStubUser); - if (!parsed_command_line().HasSwitch(switches::kLoginProfile)) { + ::switches::kLoginUser, UserManager::kStubUser); + if (!parsed_command_line().HasSwitch(::switches::kLoginProfile)) { // This must be kept in sync with TestingProfile::kTestUserProfileDir. singleton_command_line->AppendSwitchASCII( - switches::kLoginProfile, "test-user"); + ::switches::kLoginProfile, "test-user"); } LOG(INFO) << "Running as stub user with profile dir: " << singleton_command_line->GetSwitchValuePath( - switches::kLoginProfile).value(); + ::switches::kLoginProfile).value(); } // Initialize the statistics provider, which will ensure that the Chrome @@ -505,16 +506,16 @@ void ChromeBrowserMainPartsChromeos::PreProfileInit() { // 2) if passed alone, to signal that the indicated user has already // logged in and we should behave accordingly. // This handles case 2. - if (parsed_command_line().HasSwitch(switches::kLoginUser) && - !parsed_command_line().HasSwitch(switches::kLoginPassword)) { + if (parsed_command_line().HasSwitch(::switches::kLoginUser) && + !parsed_command_line().HasSwitch(::switches::kLoginPassword)) { std::string username = - parsed_command_line().GetSwitchValueASCII(switches::kLoginUser); + parsed_command_line().GetSwitchValueASCII(::switches::kLoginUser); VLOG(1) << "Relaunching browser for user: " << username; UserManager* user_manager = UserManager::Get(); // TODO(nkostylev): Get user username_hash (cryptohome mount point) // from a separate cmd line switch. std::string username_hash = - parsed_command_line().GetSwitchValueASCII(switches::kLoginProfile); + parsed_command_line().GetSwitchValueASCII(::switches::kLoginProfile); user_manager->UserLoggedIn(username, username_hash, true); // Redirects Chrome logging to the user data dir. @@ -571,8 +572,8 @@ void ChromeBrowserMainPartsChromeos::PostProfileInit() { // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() // -- just after CreateProfile(). - if (parsed_command_line().HasSwitch(switches::kLoginUser) && - !parsed_command_line().HasSwitch(switches::kLoginPassword)) { + if (parsed_command_line().HasSwitch(::switches::kLoginUser) && + !parsed_command_line().HasSwitch(::switches::kLoginPassword)) { // Make sure we flip every profile to not share proxies if the user hasn't // specified so explicitly. const PrefService::Preference* use_shared_proxies_pref = @@ -606,7 +607,7 @@ void ChromeBrowserMainPartsChromeos::PostProfileInit() { // Tests should be able to tune login manager before showing it. // Thus only show login manager in normal (non-testing) mode. if (!parameters().ui_task || - parsed_command_line().HasSwitch(switches::kForceLoginManagerInTests)) { + parsed_command_line().HasSwitch(::switches::kForceLoginManagerInTests)) { if (ShouldAutoLaunchKioskApp(parsed_command_line())) { RunAutoLaunchKioskApp(); } else { diff --git a/chrome/browser/chromeos/extensions/file_manager_browsertest.cc b/chrome/browser/chromeos/extensions/file_manager_browsertest.cc index 29bc887..4ccf480 100644 --- a/chrome/browser/chromeos/extensions/file_manager_browsertest.cc +++ b/chrome/browser/chromeos/extensions/file_manager_browsertest.cc @@ -29,7 +29,6 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" #include "chrome/test/base/ui_test_utils.h" -#include "chromeos/chromeos_switches.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/render_view_host.h" #include "net/base/escape.h" @@ -110,7 +109,7 @@ class FileManagerBrowserLocalTest : public FileManagerBrowserTestBase, virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { bool in_guest_mode = GetParam(); if (in_guest_mode) { - command_line->AppendSwitch(chromeos::switches::kGuestSession); + command_line->AppendSwitch(switches::kGuestSession); command_line->AppendSwitch(switches::kIncognito); } ExtensionApiTest::SetUpCommandLine(command_line); diff --git a/chrome/browser/chromeos/input_method/input_method_persistence_unittest.cc b/chrome/browser/chromeos/input_method/input_method_persistence_unittest.cc index 0955462..9b3bb34 100644 --- a/chrome/browser/chromeos/input_method/input_method_persistence_unittest.cc +++ b/chrome/browser/chromeos/input_method/input_method_persistence_unittest.cc @@ -15,7 +15,6 @@ #include "chrome/test/base/testing_pref_service_syncable.h" #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/testing_profile_manager.h" -#include "chromeos/chromeos_switches.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc index e2623e2..8bb121e 100644 --- a/chrome/browser/chromeos/login/chrome_restart_request.cc +++ b/chrome/browser/chromeos/login/chrome_restart_request.cc @@ -97,6 +97,7 @@ std::string DeriveCommandLine(const GURL& start_url, ::switches::kGpuStartupDialog, ::switches::kHasChromeOSDiamondKey, ::switches::kHasChromeOSKeyboard, + ::switches::kLoginProfile, ::switches::kNaturalScrollDefault, ::switches::kNoSandbox, ::switches::kPpapiFlashArgs, @@ -160,7 +161,6 @@ std::string DeriveCommandLine(const GURL& start_url, cc::switches::kUIEnablePartialSwap, cc::switches::kUIEnablePerTilePainting, chromeos::switches::kDbusStub, - chromeos::switches::kLoginProfile, gfx::switches::kEnableBrowserTextSubpixelPositioning, gfx::switches::kEnableWebkitTextSubpixelPositioning, views::corewm::switches::kNoDropShadows, @@ -300,10 +300,10 @@ std::string GetOffTheRecordCommandLine( const CommandLine& base_command_line, CommandLine* command_line) { base::DictionaryValue otr_switches; - otr_switches.SetString(switches::kGuestSession, std::string()); + otr_switches.SetString(::switches::kGuestSession, std::string()); otr_switches.SetString(::switches::kIncognito, std::string()); otr_switches.SetString(::switches::kLoggingLevel, kGuestModeLoggingLevel); - otr_switches.SetString(switches::kLoginUser, kGuestUserName); + otr_switches.SetString(::switches::kLoginUser, kGuestUserName); // Override the home page. otr_switches.SetString(::switches::kHomePage, diff --git a/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc b/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc index 5472cd4..6bbc41c 100644 --- a/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc +++ b/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc @@ -48,7 +48,6 @@ #include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/ui_test_utils.h" -#include "chromeos/chromeos_switches.h" #include "chromeos/dbus/fake_session_manager_client.h" #include "chromeos/dbus/mock_dbus_thread_manager.h" #include "chromeos/dbus/mock_session_manager_client.h" diff --git a/chrome/browser/chromeos/login/login_browsertest.cc b/chrome/browser/chromeos/login/login_browsertest.cc index 1e62260..2d58b58 100644 --- a/chrome/browser/chromeos/login/login_browsertest.cc +++ b/chrome/browser/chromeos/login/login_browsertest.cc @@ -21,7 +21,6 @@ #include "chrome/test/base/interactive_test_utils.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" -#include "chromeos/chromeos_switches.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_service.h" @@ -75,7 +74,7 @@ class LoginUserTest : public LoginTestBase { virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { command_line->AppendSwitchASCII(switches::kLoginUser, "TestUser@gmail.com"); command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); - command_line->AppendSwitch(::switches::kNoFirstRun); + command_line->AppendSwitch(switches::kNoFirstRun); } }; @@ -83,9 +82,9 @@ class LoginGuestTest : public LoginTestBase { protected: virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { command_line->AppendSwitch(switches::kGuestSession); - command_line->AppendSwitch(::switches::kIncognito); + command_line->AppendSwitch(switches::kIncognito); command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); - command_line->AppendSwitch(::switches::kNoFirstRun); + command_line->AppendSwitch(switches::kNoFirstRun); } }; diff --git a/chrome/browser/chromeos/login/login_utils_browsertest.cc b/chrome/browser/chromeos/login/login_utils_browsertest.cc index ad71d1c..d824863 100644 --- a/chrome/browser/chromeos/login/login_utils_browsertest.cc +++ b/chrome/browser/chromeos/login/login_utils_browsertest.cc @@ -41,7 +41,6 @@ #include "chrome/common/pref_names.h" #include "chrome/test/base/scoped_testing_local_state.h" #include "chrome/test/base/testing_browser_process.h" -#include "chromeos/chromeos_switches.h" #include "chromeos/cryptohome/mock_async_method_caller.h" #include "chromeos/dbus/mock_cryptohome_client.h" #include "chromeos/dbus/mock_dbus_thread_manager.h" @@ -209,8 +208,7 @@ class LoginUtilsTest : public testing::Test, ASSERT_TRUE(scoped_temp_dir_.CreateUniqueTempDir()); CommandLine* command_line = CommandLine::ForCurrentProcess(); - command_line->AppendSwitchASCII( - ::switches::kDeviceManagementUrl, kDMServer); + command_line->AppendSwitchASCII(switches::kDeviceManagementUrl, kDMServer); command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); // DBusThreadManager should be initialized before io_thread_state_, as diff --git a/chrome/browser/chromeos/login/screen_locker_browsertest.cc b/chrome/browser/chromeos/login/screen_locker_browsertest.cc index b1b9d69..279c718 100644 --- a/chrome/browser/chromeos/login/screen_locker_browsertest.cc +++ b/chrome/browser/chromeos/login/screen_locker_browsertest.cc @@ -19,7 +19,6 @@ #include "chrome/common/chrome_switches.h" #include "chrome/test/base/ui_controls.h" #include "chrome/test/base/ui_test_utils.h" -#include "chromeos/chromeos_switches.h" #include "chromeos/dbus/mock_dbus_thread_manager.h" #include "chromeos/dbus/mock_power_manager_client.h" #include "chromeos/dbus/mock_session_manager_client.h" diff --git a/chrome/browser/chromeos/login/user_image_manager_browsertest.cc b/chrome/browser/chromeos/login/user_image_manager_browsertest.cc index 8654069..f9515be 100644 --- a/chrome/browser/chromeos/login/user_image_manager_browsertest.cc +++ b/chrome/browser/chromeos/login/user_image_manager_browsertest.cc @@ -20,7 +20,6 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/testing_browser_process.h" -#include "chromeos/chromeos_switches.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_service.h" diff --git a/chrome/browser/chromeos/login/user_manager_impl.cc b/chrome/browser/chromeos/login/user_manager_impl.cc index afa66d8..546e47b 100644 --- a/chrome/browser/chromeos/login/user_manager_impl.cc +++ b/chrome/browser/chromeos/login/user_manager_impl.cc @@ -41,7 +41,6 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" -#include "chromeos/chromeos_switches.h" #include "chromeos/cryptohome/async_method_caller.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_service.h" @@ -244,7 +243,7 @@ void UserManagerImpl::UserLoggedIn(const std::string& email, bool browser_restart) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - if (!CommandLine::ForCurrentProcess()->HasSwitch(::switches::kMultiProfiles)) + if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles)) DCHECK(!IsUserLoggedIn()); if (email == kGuestUserEMail) { diff --git a/chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc b/chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc index 456b860..8ad5b84 100644 --- a/chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc +++ b/chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc @@ -21,7 +21,6 @@ #include "chrome/browser/prefs/scoped_user_pref_update.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/testing_browser_process.h" -#include "chromeos/chromeos_switches.h" #include "ui/aura/env.h" #include "ui/base/resource/resource_bundle.h" @@ -409,8 +408,8 @@ class WallpaperManagerBrowserTestNoAnimation virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { command_line->AppendSwitch(switches::kLoginManager); command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); - command_line->AppendSwitch(::switches::kDisableLoginAnimations); - command_line->AppendSwitch(::switches::kDisableBootAnimation); + command_line->AppendSwitch(switches::kDisableLoginAnimations); + command_line->AppendSwitch(switches::kDisableBootAnimation); } }; diff --git a/chrome/browser/chromeos/login/wizard_in_process_browser_test.cc b/chrome/browser/chromeos/login/wizard_in_process_browser_test.cc index f2c2a4f..cf31246 100644 --- a/chrome/browser/chromeos/login/wizard_in_process_browser_test.cc +++ b/chrome/browser/chromeos/login/wizard_in_process_browser_test.cc @@ -13,7 +13,6 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/ui_test_utils.h" -#include "chromeos/chromeos_switches.h" #include "content/public/browser/notification_service.h" namespace chromeos { @@ -29,7 +28,7 @@ void WizardInProcessBrowserTest::SetUp() { } void WizardInProcessBrowserTest::SetUpCommandLine(CommandLine* command_line) { - command_line->AppendSwitch(::switches::kNoStartupWindow); + command_line->AppendSwitch(switches::kNoStartupWindow); command_line->AppendSwitch(switches::kLoginManager); } diff --git a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc index fb160cb..437e564 100644 --- a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc +++ b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc @@ -41,7 +41,6 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/in_process_browser_test.h" -#include "chromeos/chromeos_switches.h" #include "chromeos/dbus/cryptohome_client.h" #include "chromeos/dbus/dbus_method_call_status.h" #include "chromeos/dbus/dbus_thread_manager.h" @@ -384,14 +383,14 @@ class DeviceLocalAccountTest : public InProcessBrowserTest { } virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { - command_line->AppendSwitch(chromeos::switches::kLoginManager); - command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); + command_line->AppendSwitch(switches::kLoginManager); + command_line->AppendSwitch(switches::kForceLoginManagerInTests); command_line->AppendSwitchASCII( - chromeos::switches::kLoginScreen, - chromeos::WizardController::kLoginScreenName); + switches::kLoginScreen, chromeos::WizardController::kLoginScreenName); command_line->AppendSwitchASCII( switches::kDeviceManagementUrl, test_server_.GetServiceURL().spec()); - command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); + command_line->AppendSwitchASCII( + switches::kLoginProfile, "user"); } virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc index 791b79c..d8fe830 100644 --- a/chrome/browser/chromeos/preferences.cc +++ b/chrome/browser/chromeos/preferences.cc @@ -31,7 +31,6 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" -#include "chromeos/chromeos_switches.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/power_policy_controller.h" #include "chromeos/ime/xkeyboard.h" @@ -97,7 +96,7 @@ void Preferences::RegisterUserPrefs(PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( prefs::kNaturalScroll, CommandLine::ForCurrentProcess()->HasSwitch( - ::switches::kNaturalScrollDefault), + switches::kNaturalScrollDefault), PrefRegistrySyncable::SYNCABLE_PREF); registry->RegisterBooleanPref(prefs::kPrimaryMouseButtonRight, false, @@ -792,7 +791,7 @@ void Preferences::OnIsSyncingChanged() { void Preferences::ForceNaturalScrollDefault() { DVLOG(1) << "ForceNaturalScrollDefault"; if (CommandLine::ForCurrentProcess()->HasSwitch( - ::switches::kNaturalScrollDefault) && + switches::kNaturalScrollDefault) && prefs_->IsSyncing() && !prefs_->GetUserPrefValue(prefs::kNaturalScroll)) { DVLOG(1) << "Natural scroll forced to true"; diff --git a/chrome/browser/chromeos/settings/cros_settings_provider.cc b/chrome/browser/chromeos/settings/cros_settings_provider.cc index 6ebe8b9..e5810c3 100644 --- a/chrome/browser/chromeos/settings/cros_settings_provider.cc +++ b/chrome/browser/chromeos/settings/cros_settings_provider.cc @@ -9,7 +9,6 @@ #include "base/string_util.h" #include "base/values.h" #include "chrome/common/chrome_switches.h" -#include "chromeos/chromeos_switches.h" namespace chromeos { diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager.cc b/chrome/browser/chromeos/system/automatic_reboot_manager.cc index 5bf66e7..968fdfa 100644 --- a/chrome/browser/chromeos/system/automatic_reboot_manager.cc +++ b/chrome/browser/chromeos/system/automatic_reboot_manager.cc @@ -30,7 +30,6 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/pref_names.h" -#include "chromeos/chromeos_switches.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_details.h" diff --git a/chrome/browser/chromeos/system/drm_settings.cc b/chrome/browser/chromeos/system/drm_settings.cc index 6206a45..b56e0a3 100644 --- a/chrome/browser/chromeos/system/drm_settings.cc +++ b/chrome/browser/chromeos/system/drm_settings.cc @@ -17,7 +17,6 @@ #include "chrome/browser/chromeos/login/user_manager.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" -#include "chromeos/chromeos_switches.h" #include "content/public/browser/browser_thread.h" #include "crypto/encryptor.h" #include "crypto/sha2.h" @@ -44,8 +43,7 @@ void ManageDrmIdentifierOnFileThread(bool enable, const std::string& email) { base::FilePath drm_id_file; PathService::Get(chrome::DIR_USER_DATA, &drm_id_file); const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); - base::FilePath profile = cmd_line.GetSwitchValuePath( - chromeos::switches::kLoginProfile); + base::FilePath profile = cmd_line.GetSwitchValuePath(switches::kLoginProfile); if (profile.empty()) { LOG(ERROR) << "called with no login-profile!"; return; diff --git a/chrome/browser/chromeos/system/tray_accessibility_browsertest.cc b/chrome/browser/chromeos/system/tray_accessibility_browsertest.cc index b4ba5c4..69a0b31 100644 --- a/chrome/browser/chromeos/system/tray_accessibility_browsertest.cc +++ b/chrome/browser/chromeos/system/tray_accessibility_browsertest.cc @@ -25,7 +25,6 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_profile.h" -#include "chromeos/chromeos_switches.h" #include "content/public/test/test_utils.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/views/widget/widget.h" diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc index e243bde..5f4da14 100644 --- a/chrome/browser/extensions/component_loader.cc +++ b/chrome/browser/extensions/component_loader.cc @@ -34,7 +34,6 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/user_manager.h" -#include "chromeos/chromeos_switches.h" #endif #if defined(ENABLE_APP_LIST) @@ -356,7 +355,7 @@ void ComponentLoader::AddDefaultComponentExtensions( // Skip all other extensions that require user session presence. if (!skip_session_components) { const CommandLine* command_line = CommandLine::ForCurrentProcess(); - if (!command_line->HasSwitch(chromeos::switches::kGuestSession)) + if (!command_line->HasSwitch(switches::kGuestSession)) Add(IDR_BOOKMARKS_MANIFEST, base::FilePath(FILE_PATH_LITERAL("bookmark_manager"))); @@ -424,7 +423,7 @@ void ComponentLoader::AddDefaultComponentExtensionsWithBackgroundPages( // Don't load Quickoffice component extension in Guest mode because // it doesn't work in Incognito mode due to disabled temp fs. // TODO(dpolukhin): enable Quickoffice in Guest mode. - if (!command_line->HasSwitch(chromeos::switches::kGuestSession)) { + if (!command_line->HasSwitch(switches::kGuestSession)) { Add(IDR_QUICK_OFFICE_MANIFEST, base::FilePath(FILE_PATH_LITERAL( "/usr/share/chromeos-assets/quick_office"))); } diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc index b051df9..bb85609 100644 --- a/chrome/browser/extensions/extension_browsertest.cc +++ b/chrome/browser/extensions/extension_browsertest.cc @@ -46,10 +46,6 @@ #include "extensions/common/constants.h" #include "sync/api/string_ordinal.h" -#if defined(OS_CHROMEOS) -#include "chromeos/chromeos_switches.h" -#endif - using extensions::Extension; using extensions::ExtensionCreator; using extensions::FeatureSwitch; @@ -105,9 +101,9 @@ void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { // This makes sure that we create the Default profile first, with no // ExtensionService and then the real profile with one, as we do when // running on chromeos. - command_line->AppendSwitchASCII(chromeos::switches::kLoginUser, + command_line->AppendSwitchASCII(switches::kLoginUser, "TestUser@gmail.com"); - command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); + command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); #endif } diff --git a/chrome/browser/extensions/extension_system.cc b/chrome/browser/extensions/extension_system.cc index 3831fa4..ecdebb3 100644 --- a/chrome/browser/extensions/extension_system.cc +++ b/chrome/browser/extensions/extension_system.cc @@ -50,7 +50,6 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/user_manager.h" -#include "chromeos/chromeos_switches.h" #endif using content::BrowserThread; @@ -141,8 +140,7 @@ void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) { if (!extensions_enabled) autoupdate_enabled = false; else - autoupdate_enabled = - !command_line->HasSwitch(chromeos::switches::kGuestSession); + autoupdate_enabled = !command_line->HasSwitch(switches::kGuestSession); #endif extension_service_.reset(new ExtensionService( profile_, diff --git a/chrome/browser/performance_monitor/performance_monitor_browsertest.cc b/chrome/browser/performance_monitor/performance_monitor_browsertest.cc index 425d755..75bd3cd 100644 --- a/chrome/browser/performance_monitor/performance_monitor_browsertest.cc +++ b/chrome/browser/performance_monitor/performance_monitor_browsertest.cc @@ -42,10 +42,6 @@ #include "content/public/test/test_navigation_observer.h" #include "content/public/test/test_utils.h" -#if defined(OS_CHROMEOS) -#include "chromeos/chromeos_switches.h" -#endif - #if defined(OS_MACOSX) #include "base/mac/scoped_nsautorelease_pool.h" #endif @@ -289,9 +285,9 @@ class PerformanceMonitorUncleanExitBrowserTest // typically be logged in with 'user'.) #if defined(OS_CHROMEOS) const CommandLine command_line = *CommandLine::ForCurrentProcess(); - if (command_line.HasSwitch(chromeos::switches::kLoginProfile)) { + if (command_line.HasSwitch(switches::kLoginProfile)) { first_profile_name_ = - command_line.GetSwitchValueASCII(chromeos::switches::kLoginProfile); + command_line.GetSwitchValueASCII(switches::kLoginProfile); } else { first_profile_name_ = chrome::kInitialProfile; } diff --git a/chrome/browser/policy/browser_policy_connector.cc b/chrome/browser/policy/browser_policy_connector.cc index 45cf305..997e187 100644 --- a/chrome/browser/policy/browser_policy_connector.cc +++ b/chrome/browser/policy/browser_policy_connector.cc @@ -66,7 +66,6 @@ #include "chrome/browser/chromeos/system/statistics_provider.h" #include "chrome/browser/chromeos/system/timezone_settings.h" #include "chrome/browser/policy/cloud/resource_cache.h" -#include "chromeos/chromeos_switches.h" #include "chromeos/dbus/cryptohome_client.h" #include "chromeos/dbus/dbus_thread_manager.h" #else @@ -322,7 +321,7 @@ void BrowserPolicyConnector::InitializeUserPolicy( base::FilePath profile_dir; CHECK(PathService::Get(chrome::DIR_USER_DATA, &profile_dir)); profile_dir = profile_dir.Append( - command_line->GetSwitchValuePath(chromeos::switches::kLoginProfile)); + command_line->GetSwitchValuePath(switches::kLoginProfile)); const base::FilePath legacy_dir = profile_dir.Append(kDeviceManagementDir); const base::FilePath policy_cache_file = legacy_dir.Append(kPolicy); const base::FilePath token_cache_file = legacy_dir.Append(kToken); diff --git a/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc b/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc index 95e63bc..5875498 100644 --- a/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc +++ b/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc @@ -35,7 +35,6 @@ #include "chrome/browser/chromeos/login/user_manager.h" #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" #include "chrome/common/chrome_paths.h" -#include "chromeos/chromeos_switches.h" #include "chromeos/dbus/mock_cryptohome_client.h" #include "chromeos/dbus/mock_dbus_thread_manager.h" #include "chromeos/dbus/mock_session_manager_client.h" @@ -139,8 +138,7 @@ class ComponentCloudPolicyTest : public ExtensionBrowserTest { // ExtensionBrowserTest sets the login users to a non-managed value; // replace it. This is the default username sent in policy blobs from the // testserver. - command_line->AppendSwitchASCII( - chromeos::switches::kLoginUser, "user@example.com"); + command_line->AppendSwitchASCII(switches::kLoginUser, "user@example.com"); #endif } diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc index 36c1f66..ca0311f 100644 --- a/chrome/browser/profiles/profile.cc +++ b/chrome/browser/profiles/profile.cc @@ -21,7 +21,6 @@ #if defined(OS_CHROMEOS) #include "base/command_line.h" #include "chrome/common/chrome_switches.h" -#include "chromeos/chromeos_switches.h" #endif Profile::Profile() @@ -130,8 +129,8 @@ std::string Profile::GetDebugName() { bool Profile::IsGuestSession() const { #if defined(OS_CHROMEOS) - static bool is_guest_session = CommandLine::ForCurrentProcess()->HasSwitch( - chromeos::switches::kGuestSession); + static bool is_guest_session = + CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession); return is_guest_session; #else return false; diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc index 59f2e69..ee1ec12 100644 --- a/chrome/browser/profiles/profile_manager.cc +++ b/chrome/browser/profiles/profile_manager.cc @@ -68,7 +68,6 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/login/user_manager.h" -#include "chromeos/chromeos_switches.h" #include "chromeos/dbus/cryptohome_client.h" #include "chromeos/dbus/dbus_thread_manager.h" #endif @@ -315,9 +314,8 @@ base::FilePath ProfileManager::GetInitialProfileDir() { if (logged_in_) { base::FilePath profile_dir; // If the user has logged in, pick up the new profile. - if (command_line.HasSwitch(chromeos::switches::kLoginProfile)) { - profile_dir = command_line.GetSwitchValuePath( - chromeos::switches::kLoginProfile); + if (command_line.HasSwitch(switches::kLoginProfile)) { + profile_dir = command_line.GetSwitchValuePath(switches::kLoginProfile); } else { // We should never be logged in with no profile dir. NOTREACHED(); @@ -995,7 +993,7 @@ bool ProfileManager::ShouldGoOffTheRecord() { const CommandLine& command_line = *CommandLine::ForCurrentProcess(); if (!logged_in_ && (!command_line.HasSwitch(switches::kTestType) || - command_line.HasSwitch(chromeos::switches::kLoginProfile))) { + command_line.HasSwitch(switches::kLoginProfile))) { go_off_the_record = true; } #endif diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc index 7dd3c1f..ebc8b58 100644 --- a/chrome/browser/profiles/profile_manager_unittest.cc +++ b/chrome/browser/profiles/profile_manager_unittest.cc @@ -39,7 +39,6 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/cros/cros_library.h" -#include "chromeos/chromeos_switches.h" #endif using content::BrowserThread; @@ -167,7 +166,7 @@ TEST_F(ProfileManagerTest, LoggedInProfileDir) { CommandLine *cl = CommandLine::ForCurrentProcess(); std::string profile_dir("my_user"); - cl->AppendSwitchASCII(chromeos::switches::kLoginProfile, profile_dir); + cl->AppendSwitchASCII(switches::kLoginProfile, profile_dir); base::FilePath expected_default = base::FilePath().AppendASCII(chrome::kInitialProfile); diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc index e5e9d6e..ff0ec58 100644 --- a/chrome/browser/shell_integration.cc +++ b/chrome/browser/shell_integration.cc @@ -18,10 +18,6 @@ #include "chrome/common/pref_names.h" #include "content/public/browser/browser_thread.h" -#if defined(OS_CHROMEOS) -#include "chromeos/chromeos_switches.h" -#endif - using content::BrowserThread; ShellIntegration::DefaultWebClientSetPermission @@ -85,10 +81,9 @@ CommandLine ShellIntegration::CommandLineArgsForLauncher( } #if defined(OS_CHROMEOS) - base::FilePath profile = cmd_line.GetSwitchValuePath( - chromeos::switches::kLoginProfile); + base::FilePath profile = cmd_line.GetSwitchValuePath(switches::kLoginProfile); if (!profile.empty()) - new_cmd_line.AppendSwitchPath(chromeos::switches::kLoginProfile, profile); + new_cmd_line.AppendSwitchPath(switches::kLoginProfile, profile); #else if (!profile_path.empty() && !extension_app_id.empty()) new_cmd_line.AppendSwitchPath(switches::kProfileDirectory, diff --git a/chrome/browser/ui/ash/ash_init.cc b/chrome/browser/ui/ash/ash_init.cc index 6fb57de..ee1e16e 100644 --- a/chrome/browser/ui/ash/ash_init.cc +++ b/chrome/browser/ui/ash/ash_init.cc @@ -32,7 +32,6 @@ #include "chrome/browser/ui/ash/brightness_controller_chromeos.h" #include "chrome/browser/ui/ash/ime_controller_chromeos.h" #include "chrome/browser/ui/ash/volume_controller_chromeos.h" -#include "chromeos/chromeos_switches.h" #include "ui/base/x/x11_util.h" #endif @@ -52,8 +51,7 @@ bool ShouldInitiallyHideCursor() { if (base::chromeos::IsRunningOnChromeOS()) return !chromeos::UserManager::Get()->IsUserLoggedIn(); else - return CommandLine::ForCurrentProcess()->HasSwitch( - chromeos::switches::kLoginManager); + return CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginManager); } #endif diff --git a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc index 74592fc..75c7386 100644 --- a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc +++ b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc @@ -40,7 +40,6 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" -#include "chromeos/chromeos_switches.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/power_manager_client.h" #include "chromeos/dbus/session_manager_client.h" @@ -55,8 +54,7 @@ bool ChromeShellDelegate::IsUserLoggedIn() const { // workstation) and not running as login-manager, pretend like we're always // logged in. if (!base::chromeos::IsRunningOnChromeOS() && - !CommandLine::ForCurrentProcess()->HasSwitch( - chromeos::switches::kLoginManager)) { + !CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginManager)) { return true; } @@ -69,13 +67,11 @@ bool ChromeShellDelegate::IsSessionStarted() const { } bool ChromeShellDelegate::IsGuestSession() const { - return CommandLine::ForCurrentProcess()->HasSwitch( - chromeos::switches::kGuestSession); + return CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession); } bool ChromeShellDelegate::IsFirstRunAfterBoot() const { - return CommandLine::ForCurrentProcess()->HasSwitch( - chromeos::switches::kFirstBoot); + return CommandLine::ForCurrentProcess()->HasSwitch(switches::kFirstBoot); } bool ChromeShellDelegate::CanLockScreen() const { diff --git a/chrome/browser/ui/browser_navigator_browsertest_chromeos.cc b/chrome/browser/ui/browser_navigator_browsertest_chromeos.cc index 8e2416e..2dc90b0 100644 --- a/chrome/browser/ui/browser_navigator_browsertest_chromeos.cc +++ b/chrome/browser/ui/browser_navigator_browsertest_chromeos.cc @@ -12,7 +12,6 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/ui_test_utils.h" -#include "chromeos/chromeos_switches.h" #include "content/public/browser/web_contents.h" namespace { @@ -26,8 +25,7 @@ class BrowserGuestSessionNavigatorTest: public BrowserNavigatorTest { protected: virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { CommandLine command_line_copy = *command_line; - command_line_copy.AppendSwitchASCII( - chromeos::switches::kLoginProfile, "user"); + command_line_copy.AppendSwitchASCII(switches::kLoginProfile, "user"); chromeos::GetOffTheRecordCommandLine(GetGoogleURL(), command_line_copy, command_line); diff --git a/chrome/browser/ui/startup/startup_browser_creator.cc b/chrome/browser/ui/startup/startup_browser_creator.cc index 08086b4..1738248 100644 --- a/chrome/browser/ui/startup/startup_browser_creator.cc +++ b/chrome/browser/ui/startup/startup_browser_creator.cc @@ -71,7 +71,6 @@ #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" #include "chrome/browser/chromeos/login/user_manager.h" #include "chrome/browser/chromeos/profile_startup.h" -#include "chromeos/chromeos_switches.h" #endif #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) @@ -457,7 +456,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( #if defined(OS_CHROMEOS) // kLoginManager will cause Chrome to start up with the ChromeOS login // screen instead of a browser window, so it won't load any tabs. - } else if (command_line.HasSwitch(chromeos::switches::kLoginManager)) { + } else if (command_line.HasSwitch(switches::kLoginManager)) { expected_tab_count = 0; #endif } else if (command_line.HasSwitch(switches::kRestoreLastSession)) { @@ -569,8 +568,8 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( #if defined(OS_CHROMEOS) // The browser will be launched after the user logs in. - if (command_line.HasSwitch(chromeos::switches::kLoginManager) || - command_line.HasSwitch(chromeos::switches::kLoginPassword)) { + if (command_line.HasSwitch(switches::kLoginManager) || + command_line.HasSwitch(switches::kLoginPassword)) { silent_launch = true; } diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc index bf5b7b1..39b5c53 100644 --- a/chrome/browser/ui/toolbar/wrench_menu_model.cc +++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc @@ -58,10 +58,6 @@ #include "ui/gfx/image/image_skia.h" #include "ui/native_theme/native_theme.h" -#if defined(OS_CHROMEOS) -#include "chromeos/chromeos_switches.h" -#endif - #if defined(OS_WIN) #include "base/win/metro.h" #include "base/win/windows_version.h" @@ -507,8 +503,7 @@ void WrenchMenuModel::Build(bool is_new_menu, bool supports_new_separators) { #else // defined(OS_WIN) AddItemWithStringId(IDC_NEW_WINDOW, IDS_NEW_WINDOW); #if defined(OS_CHROMEOS) - if (!CommandLine::ForCurrentProcess()->HasSwitch( - chromeos::switches::kGuestSession)) + if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW); #else AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW); diff --git a/chrome/browser/ui/webui/chromeos/login/reset_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/reset_screen_handler.cc index 066a583..fac1fbf 100644 --- a/chrome/browser/ui/webui/chromeos/login/reset_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/reset_screen_handler.cc @@ -13,7 +13,6 @@ #include "chrome/browser/browser_process.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" -#include "chromeos/chromeos_switches.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/power_manager_client.h" #include "chromeos/dbus/session_manager_client.h" diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc index 455f190..86e5ce1 100644 --- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc +++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc @@ -60,10 +60,6 @@ #include "ui/webui/jstemplate_builder.h" #include "ui/webui/web_ui_util.h" -#if defined(OS_CHROMEOS) -#include "chromeos/chromeos_switches.h" -#endif - #if defined(OS_MACOSX) #include "chrome/browser/platform_util.h" #endif @@ -283,8 +279,7 @@ void NTPResourceCache::CreateNewTabIncognitoHTML() { const char* new_tab_link = kLearnMoreIncognitoUrl; // TODO(altimofeev): consider implementation without 'if def' usage. #if defined(OS_CHROMEOS) - if (CommandLine::ForCurrentProcess()->HasSwitch( - chromeos::switches::kGuestSession)) { + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) { new_tab_message_ids = IDS_NEW_TAB_GUEST_SESSION_MESSAGE; new_tab_html_idr = IDR_GUEST_SESSION_TAB_HTML; new_tab_link = kLearnMoreGuestSessionUrl; diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc index b993894..dabe85a 100644 --- a/chrome/browser/ui/webui/options/browser_options_handler.cc +++ b/chrome/browser/ui/webui/options/browser_options_handler.cc @@ -89,7 +89,6 @@ #if !defined(OS_CHROMEOS) #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" #include "chrome/browser/ui/webui/options/advanced_options_utils.h" -#include "chromeos/chromeos_switches.h" #endif #if defined(OS_CHROMEOS) @@ -1419,8 +1418,7 @@ void BrowserOptionsHandler::SetupAccessibilityFeatures() { void BrowserOptionsHandler::SetupMetricsReportingSettingVisibility() { #if defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) // Don't show the reporting setting if we are in the guest mode. - if (CommandLine::ForCurrentProcess()->HasSwitch( - chromeos::switches::kGuestSession)) { + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) { base::FundamentalValue visible(false); web_ui()->CallJavascriptFunction( "BrowserOptions.setMetricsReportingSettingVisibility", visible); diff --git a/chrome/browser/ui/webui/options/chromeos/guest_mode_options_ui_browsertest.cc b/chrome/browser/ui/webui/options/chromeos/guest_mode_options_ui_browsertest.cc index 5256c8d..13c34c6 100644 --- a/chrome/browser/ui/webui/options/chromeos/guest_mode_options_ui_browsertest.cc +++ b/chrome/browser/ui/webui/options/chromeos/guest_mode_options_ui_browsertest.cc @@ -5,7 +5,6 @@ #include "base/command_line.h" #include "chrome/browser/ui/webui/options/options_ui_browsertest.h" #include "chrome/common/chrome_switches.h" -#include "chromeos/chromeos_switches.h" namespace { @@ -13,10 +12,10 @@ namespace { // switches. class GuestModeOptionsBrowserTest : public options::OptionsBrowserTest { public: - GuestModeOptionsBrowserTest() : OptionsBrowserTest() {} + GuestModeOptionsBrowserTest() : OptionsBrowserTest() {} - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { - command_line->AppendSwitch(chromeos::switches::kGuestSession); + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { + command_line->AppendSwitch(switches::kGuestSession); command_line->AppendSwitch(switches::kIncognito); } }; diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index d571e69..eece4cf 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -362,9 +362,6 @@ ], }], ['chromeos==1', { - 'dependencies': [ - '../chromeos/chromeos.gyp:chromeos', - ], 'sources': [ 'browser/chromeos/cros/cros_in_process_browser_test.cc', 'browser/chromeos/cros/cros_in_process_browser_test.h', diff --git a/chrome/common/DEPS b/chrome/common/DEPS index 395eb6e..928db71 100644 --- a/chrome/common/DEPS +++ b/chrome/common/DEPS @@ -2,7 +2,6 @@ include_rules = [ "+apps/app_shim", # For app shim messages. "+breakpad", # For Breakpad constants. "+chrome/plugin", # For checking whether we're a plugin process. - "+chromeos", # For chromeos_switches.h "+components/autofill/common", "+device/bluetooth", # For BluetoothDevicePermission "+device/media_transfer_protocol", # For MediaTransferProtocolManager diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 2b80448..560b81c 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -1547,6 +1547,13 @@ const char kEnableStaticIPConfig[] = "enable-static-ip-config"; // default, which needs additional UI work. const char kEnableWebTrustCerts[] = "enable-web-trust-certs"; +// Passed to Chrome on first boot. Not passed on restart after sign out. +const char kFirstBoot[] = "first-boot"; + +// Usually in browser tests the usual login manager bringup is skipped so that +// tests can change how it's brought up. This flag disables that. +const char kForceLoginManagerInTests[] = "force-login-manager-in-tests"; + // If true, the Chromebook has a Chrome OS keyboard. Don't use the flag for // Chromeboxes. const char kHasChromeOSKeyboard[] = "has-chromeos-keyboard"; @@ -1557,6 +1564,28 @@ const char kHasChromeOSDiamondKey[] = "has-chromeos-diamond-key"; // Path for the screensaver used in Kiosk mode const char kKioskModeScreensaverPath[] = "kiosk-mode-screensaver-path"; +// Enables Chrome-as-a-login-manager behavior. +const char kLoginManager[] = "login-manager"; + +// Allows to override the first login screen. The value should be the name of +// the first login screen to show (see +// chrome/browser/chromeos/login/login_wizard_view.cc for actual names). +// Ignored if kLoginManager is not specified. TODO(avayvod): Remove when the +// switch is no longer needed for testing. +const char kLoginScreen[] = "login-screen"; + +// Controls the initial login screen size. Pass width,height. +const char kLoginScreenSize[] = "login-screen-size"; + +// Specifies the profile to use once a chromeos user is logged in. +const char kLoginProfile[] = "login-profile"; + +// Specifies the user which is already logged in. +const char kLoginUser[] = "login-user"; + +// Specifies a password to be used to login (along with login-user). +const char kLoginPassword[] = "login-password"; + // Enables natural scroll by default. const char kNaturalScrollDefault[] = "enable-natural-scroll-default"; @@ -1565,6 +1594,10 @@ const char kNaturalScrollDefault[] = "enable-natural-scroll-default"; // out-of-memory process killer. const char kNoDiscardTabs[] = "no-discard-tabs"; +// Indicates that the browser is in "browse without sign-in" (Guest session) +// mode. Should completely disable extensions, sync and bookmarks. +const char kGuestSession[] = "bwsi"; + // Enables overriding the path for the default echo component extension. // Useful for testing. const char kEchoExtensionPath[] = "echo-ext-path"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index ceff503..8d402a7 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -411,7 +411,6 @@ extern const char kOpenAsh[]; #if defined(OS_CHROMEOS) // Keep switches in alphabetical order. -// See also src/chromeos/chromeos_switches.h extern const char kAshWebUIInit[]; extern const char kDisableAppMode[]; extern const char kDisableBootAnimation[]; @@ -431,11 +430,22 @@ extern const char kEnableKioskMode[]; extern const char kEnableRequestTabletSite[]; extern const char kEnableStaticIPConfig[]; extern const char kEnableWebTrustCerts[]; +extern const char kFirstBoot[]; +extern const char kForceLoginManagerInTests[]; extern const char kHasChromeOSKeyboard[]; extern const char kHasChromeOSDiamondKey[]; extern const char kKioskModeScreensaverPath[]; +extern const char kLoginManager[]; +// TODO(avayvod): Remove this flag when it's unnecessary for testing +// purposes. +extern const char kLoginScreen[]; +extern const char kLoginScreenSize[]; +extern const char kLoginProfile[]; +extern const char kLoginUser[]; +extern const char kLoginPassword[]; extern const char kNaturalScrollDefault[]; extern const char kNoDiscardTabs[]; +extern const char kGuestSession[]; extern const char kEchoExtensionPath[]; extern const char kStubCrosSettings[]; extern const char kAuthExtensionPath[]; diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc index 9095873..896cc7b 100644 --- a/chrome/common/logging_chrome.cc +++ b/chrome/common/logging_chrome.cc @@ -51,10 +51,6 @@ #include "chrome/common/env_vars.h" #include "ipc/ipc_logging.h" -#if defined(OS_CHROMEOS) -#include "chromeos/chromeos_switches.h" -#endif - #if defined(OS_WIN) #include <initguid.h> #include "base/logging_win.h" @@ -209,7 +205,7 @@ base::FilePath GetSessionLogFile(const CommandLine& command_line) { } else { PathService::Get(chrome::DIR_USER_DATA, &log_dir); base::FilePath login_profile = - command_line.GetSwitchValuePath(chromeos::switches::kLoginProfile); + command_line.GetSwitchValuePath(switches::kLoginProfile); log_dir = log_dir.Append(login_profile); } return log_dir.Append(GetLogFileName().BaseName()); @@ -272,7 +268,7 @@ void InitChromeLogging(const CommandLine& command_line, // For BWSI (Incognito) logins, we want to put the logs in the user // profile directory that is created for the temporary session instead // of in the system log directory, for privacy reasons. - if (command_line.HasSwitch(chromeos::switches::kGuestSession)) + if (command_line.HasSwitch(switches::kGuestSession)) log_path = GetSessionLogFile(command_line); // On ChromeOS we log to the symlink. We force creation of a new diff --git a/chromeos/chromeos_switches.cc b/chromeos/chromeos_switches.cc index 6f0901d..e08e74a 100644 --- a/chromeos/chromeos_switches.cc +++ b/chromeos/chromeos_switches.cc @@ -28,52 +28,19 @@ const char kEnableNewNetworkChangeNotifier[] = const char kEnableOOBEBlockingUpdate[] = "enable-oobe-blocking-update"; +// Enables usage of the new ManagedNetworkConfigurationHandler and +// NetworkConfigurationHandler singletons. +const char kUseNewNetworkConfigurationHandlers[] = + "use-new-network-configuration-handlers"; + // Enables screensaver extensions. const char kEnableScreensaverExtensions[] = "enable-screensaver-extensions"; // Enable "interactive" mode for stub implemenations (e.g. NetworkStateHandler) const char kEnableStubInteractive[] = "enable-stub-interactive"; -// Passed to Chrome on first boot. Not passed on restart after sign out. -const char kFirstBoot[] = "first-boot"; - -// Usually in browser tests the usual login manager bringup is skipped so that -// tests can change how it's brought up. This flag disables that. -const char kForceLoginManagerInTests[] = "force-login-manager-in-tests"; - -// Indicates that the browser is in "browse without sign-in" (Guest session) -// mode. Should completely disable extensions, sync and bookmarks. -const char kGuestSession[] = "bwsi"; - -// Enables Chrome-as-a-login-manager behavior. -const char kLoginManager[] = "login-manager"; - -// Specifies a password to be used to login (along with login-user). -const char kLoginPassword[] = "login-password"; - -// Specifies the profile to use once a chromeos user is logged in. -const char kLoginProfile[] = "login-profile"; - -// Allows to override the first login screen. The value should be the name of -// the first login screen to show (see -// chrome/browser/chromeos/login/login_wizard_view.cc for actual names). -// Ignored if kLoginManager is not specified. TODO(avayvod): Remove when the -// switch is no longer needed for testing. -const char kLoginScreen[] = "login-screen"; - -// Controls the initial login screen size. Pass width,height. -const char kLoginScreenSize[] = "login-screen-size"; - -// Specifies the user which is already logged in. -const char kLoginUser[] = "login-user"; - // Sends test messages on first call to RequestUpdate (stub only). const char kSmsTestMessages[] = "sms-test-messages"; -// Enables usage of the new ManagedNetworkConfigurationHandler and -// NetworkConfigurationHandler singletons. -const char kUseNewNetworkConfigurationHandlers[] = - "use-new-network-configuration-handlers"; - -} // namespace switches +} // namespace switches } // namespace chromeos diff --git a/chromeos/chromeos_switches.h b/chromeos/chromeos_switches.h index 86122c2..1d5dd59 100644 --- a/chromeos/chromeos_switches.h +++ b/chromeos/chromeos_switches.h @@ -26,21 +26,10 @@ CHROMEOS_EXPORT extern const char kDisableStubEthernet[]; CHROMEOS_EXPORT extern const char kEnableExperimentalBluetooth[]; CHROMEOS_EXPORT extern const char kEnableNewNetworkChangeNotifier[]; CHROMEOS_EXPORT extern const char kEnableOOBEBlockingUpdate[]; +CHROMEOS_EXPORT extern const char kUseNewNetworkConfigurationHandlers[]; CHROMEOS_EXPORT extern const char kEnableScreensaverExtensions[]; CHROMEOS_EXPORT extern const char kEnableStubInteractive[]; -CHROMEOS_EXPORT extern const char kForceLoginManagerInTests[]; -CHROMEOS_EXPORT extern const char kFirstBoot[]; -CHROMEOS_EXPORT extern const char kGuestSession[]; -CHROMEOS_EXPORT extern const char kLoginManager[]; -CHROMEOS_EXPORT extern const char kLoginPassword[]; -CHROMEOS_EXPORT extern const char kLoginProfile[]; -// TODO(avayvod): Remove this flag when it's unnecessary for testing -// purposes. -CHROMEOS_EXPORT extern const char kLoginScreen[]; -CHROMEOS_EXPORT extern const char kLoginScreenSize[]; -CHROMEOS_EXPORT extern const char kLoginUser[]; CHROMEOS_EXPORT extern const char kSmsTestMessages[]; -CHROMEOS_EXPORT extern const char kUseNewNetworkConfigurationHandlers[]; } // namespace switches } // namespace chromeos |