| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/chromeos/chrome_browser_main_chromeos.h" | 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 #include "chrome/browser/chromeos/system_key_event_listener.h" | 71 #include "chrome/browser/chromeos/system_key_event_listener.h" |
| 72 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" | 72 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" |
| 73 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" | 73 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" |
| 74 #include "chrome/browser/defaults.h" | 74 #include "chrome/browser/defaults.h" |
| 75 #include "chrome/browser/metrics/metrics_service.h" | 75 #include "chrome/browser/metrics/metrics_service.h" |
| 76 #include "chrome/browser/net/chrome_network_delegate.h" | 76 #include "chrome/browser/net/chrome_network_delegate.h" |
| 77 #include "chrome/browser/policy/browser_policy_connector.h" | 77 #include "chrome/browser/policy/browser_policy_connector.h" |
| 78 #include "chrome/browser/profiles/profile.h" | 78 #include "chrome/browser/profiles/profile.h" |
| 79 #include "chrome/browser/profiles/profile_manager.h" | 79 #include "chrome/browser/profiles/profile_manager.h" |
| 80 #include "chrome/browser/rlz/rlz.h" | 80 #include "chrome/browser/rlz/rlz.h" |
| 81 #include "chrome/common/chrome_constants.h" |
| 81 #include "chrome/common/chrome_paths.h" | 82 #include "chrome/common/chrome_paths.h" |
| 82 #include "chrome/common/chrome_switches.h" | 83 #include "chrome/common/chrome_switches.h" |
| 83 #include "chrome/common/chrome_version_info.h" | 84 #include "chrome/common/chrome_version_info.h" |
| 84 #include "chrome/common/logging_chrome.h" | 85 #include "chrome/common/logging_chrome.h" |
| 85 #include "chrome/common/pref_names.h" | 86 #include "chrome/common/pref_names.h" |
| 86 #include "chromeos/audio/audio_devices_pref_handler.h" | 87 #include "chromeos/audio/audio_devices_pref_handler.h" |
| 87 #include "chromeos/audio/cras_audio_handler.h" | 88 #include "chromeos/audio/cras_audio_handler.h" |
| 88 #include "chromeos/chromeos_paths.h" | 89 #include "chromeos/chromeos_paths.h" |
| 89 #include "chromeos/chromeos_switches.h" | 90 #include "chromeos/chromeos_switches.h" |
| 90 #include "chromeos/cryptohome/async_method_caller.h" | 91 #include "chromeos/cryptohome/async_method_caller.h" |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 // If we're not running on real ChromeOS hardware (or under VM), and are not | 369 // If we're not running on real ChromeOS hardware (or under VM), and are not |
| 369 // showing the login manager or attempting a command line login, login with a | 370 // showing the login manager or attempting a command line login, login with a |
| 370 // stub user. | 371 // stub user. |
| 371 if (!base::chromeos::IsRunningOnChromeOS() && | 372 if (!base::chromeos::IsRunningOnChromeOS() && |
| 372 !parsed_command_line().HasSwitch(switches::kLoginManager) && | 373 !parsed_command_line().HasSwitch(switches::kLoginManager) && |
| 373 !parsed_command_line().HasSwitch(switches::kLoginUser) && | 374 !parsed_command_line().HasSwitch(switches::kLoginUser) && |
| 374 !parsed_command_line().HasSwitch(switches::kGuestSession)) { | 375 !parsed_command_line().HasSwitch(switches::kGuestSession)) { |
| 375 singleton_command_line->AppendSwitchASCII( | 376 singleton_command_line->AppendSwitchASCII( |
| 376 switches::kLoginUser, UserManager::kStubUser); | 377 switches::kLoginUser, UserManager::kStubUser); |
| 377 if (!parsed_command_line().HasSwitch(switches::kLoginProfile)) { | 378 if (!parsed_command_line().HasSwitch(switches::kLoginProfile)) { |
| 378 // This must be kept in sync with TestingProfile::kTestUserProfileDir. | 379 singleton_command_line->AppendSwitchASCII(switches::kLoginProfile, |
| 379 singleton_command_line->AppendSwitchASCII( | 380 chrome::kTestUserProfileDir); |
| 380 switches::kLoginProfile, "test-user"); | |
| 381 } | 381 } |
| 382 LOG(INFO) << "Running as stub user with profile dir: " | 382 LOG(INFO) << "Running as stub user with profile dir: " |
| 383 << singleton_command_line->GetSwitchValuePath( | 383 << singleton_command_line->GetSwitchValuePath( |
| 384 switches::kLoginProfile).value(); | 384 switches::kLoginProfile).value(); |
| 385 } | 385 } |
| 386 | 386 |
| 387 // Initialize the statistics provider, which will ensure that the Chrome | 387 // Initialize the statistics provider, which will ensure that the Chrome |
| 388 // channel info is read and made available early. | 388 // channel info is read and made available early. |
| 389 system::StatisticsProvider::GetInstance()->Init(); | 389 system::StatisticsProvider::GetInstance()->Init(); |
| 390 | 390 |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 | 782 |
| 783 // Destroy DeviceSettingsService after g_browser_process. | 783 // Destroy DeviceSettingsService after g_browser_process. |
| 784 DeviceSettingsService::Shutdown(); | 784 DeviceSettingsService::Shutdown(); |
| 785 } | 785 } |
| 786 | 786 |
| 787 void ChromeBrowserMainPartsChromeos::SetupPlatformFieldTrials() { | 787 void ChromeBrowserMainPartsChromeos::SetupPlatformFieldTrials() { |
| 788 default_pinned_apps_field_trial::SetupTrial(); | 788 default_pinned_apps_field_trial::SetupTrial(); |
| 789 } | 789 } |
| 790 | 790 |
| 791 } // namespace chromeos | 791 } // namespace chromeos |
| OLD | NEW |