| OLD | NEW |
| 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/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 "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h" | 30 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h" |
| 31 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 31 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
| 32 #include "chrome/browser/chromeos/login/authenticator.h" | 32 #include "chrome/browser/chromeos/login/authenticator.h" |
| 33 #include "chrome/browser/chromeos/login/login_utils.h" | 33 #include "chrome/browser/chromeos/login/login_utils.h" |
| 34 #include "chrome/browser/chromeos/login/login_wizard.h" | 34 #include "chrome/browser/chromeos/login/login_wizard.h" |
| 35 #include "chrome/browser/chromeos/login/ownership_service.h" | 35 #include "chrome/browser/chromeos/login/ownership_service.h" |
| 36 #include "chrome/browser/chromeos/login/screen_locker.h" | 36 #include "chrome/browser/chromeos/login/screen_locker.h" |
| 37 #include "chrome/browser/chromeos/login/session_manager_observer.h" | 37 #include "chrome/browser/chromeos/login/session_manager_observer.h" |
| 38 #include "chrome/browser/chromeos/login/user_manager.h" | 38 #include "chrome/browser/chromeos/login/user_manager.h" |
| 39 #include "chrome/browser/chromeos/login/wallpaper_manager.h" | 39 #include "chrome/browser/chromeos/login/wallpaper_manager.h" |
| 40 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 40 #include "chrome/browser/chromeos/low_memory_observer.h" | 41 #include "chrome/browser/chromeos/low_memory_observer.h" |
| 41 #include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h" | 42 #include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h" |
| 42 #include "chrome/browser/chromeos/net/network_change_notifier_chromeos.h" | 43 #include "chrome/browser/chromeos/net/network_change_notifier_chromeos.h" |
| 43 #include "chrome/browser/chromeos/oom_priority_manager.h" | 44 #include "chrome/browser/chromeos/oom_priority_manager.h" |
| 44 #include "chrome/browser/chromeos/power/brightness_observer.h" | 45 #include "chrome/browser/chromeos/power/brightness_observer.h" |
| 45 #include "chrome/browser/chromeos/power/output_observer.h" | 46 #include "chrome/browser/chromeos/power/output_observer.h" |
| 46 #include "chrome/browser/chromeos/power/power_button_controller_delegate_chromeo
s.h" | 47 #include "chrome/browser/chromeos/power/power_button_controller_delegate_chromeo
s.h" |
| 47 #include "chrome/browser/chromeos/power/power_button_observer.h" | 48 #include "chrome/browser/chromeos/power/power_button_observer.h" |
| 48 #include "chrome/browser/chromeos/power/power_state_override.h" | 49 #include "chrome/browser/chromeos/power/power_state_override.h" |
| 49 #include "chrome/browser/chromeos/power/resume_observer.h" | 50 #include "chrome/browser/chromeos/power/resume_observer.h" |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 profile()->GetPrefs()->SetBoolean(prefs::kUseSharedProxies, false); | 413 profile()->GetPrefs()->SetBoolean(prefs::kUseSharedProxies, false); |
| 413 } | 414 } |
| 414 | 415 |
| 415 if (parsed_command_line().HasSwitch(switches::kEnableONCPolicy)) { | 416 if (parsed_command_line().HasSwitch(switches::kEnableONCPolicy)) { |
| 416 network_config_updater_.reset( | 417 network_config_updater_.reset( |
| 417 new policy::NetworkConfigurationUpdater( | 418 new policy::NetworkConfigurationUpdater( |
| 418 g_browser_process->policy_service(), | 419 g_browser_process->policy_service(), |
| 419 chromeos::CrosLibrary::Get()->GetNetworkLibrary())); | 420 chromeos::CrosLibrary::Get()->GetNetworkLibrary())); |
| 420 } | 421 } |
| 421 | 422 |
| 423 // Make sure that wallpaper boot transition and other delays in OOBE |
| 424 // are disabled for tests by default. |
| 425 // Individual tests may enable them if they want. |
| 426 if (parsed_command_line().HasSwitch(switches::kTestType)) |
| 427 chromeos::WizardController::SetZeroDelays(); |
| 428 |
| 422 // Tests should be able to tune login manager before showing it. | 429 // Tests should be able to tune login manager before showing it. |
| 423 // Thus only show login manager in normal (non-testing) mode. | 430 // Thus only show login manager in normal (non-testing) mode. |
| 424 if (!parameters().ui_task) | 431 if (!parameters().ui_task) |
| 425 OptionallyRunChromeOSLoginManager(parsed_command_line(), profile()); | 432 OptionallyRunChromeOSLoginManager(parsed_command_line(), profile()); |
| 426 | 433 |
| 427 // These observers must be initialized after the profile because | 434 // These observers must be initialized after the profile because |
| 428 // they use the profile to dispatch extension events. | 435 // they use the profile to dispatch extension events. |
| 429 // | 436 // |
| 430 // Initialize the brightness observer so that we'll display an onscreen | 437 // Initialize the brightness observer so that we'll display an onscreen |
| 431 // indication of brightness changes during login. | 438 // indication of brightness changes during login. |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 LOG(WARNING) << "low_mem: Part of '100MB' experiment"; | 588 LOG(WARNING) << "low_mem: Part of '100MB' experiment"; |
| 582 chromeos::LowMemoryObserver::SetLowMemoryMargin(100); | 589 chromeos::LowMemoryObserver::SetLowMemoryMargin(100); |
| 583 } else if (trial->group() == margin_200mb) { | 590 } else if (trial->group() == margin_200mb) { |
| 584 LOG(WARNING) << "low_mem: Part of '200MB' experiment"; | 591 LOG(WARNING) << "low_mem: Part of '200MB' experiment"; |
| 585 chromeos::LowMemoryObserver::SetLowMemoryMargin(200); | 592 chromeos::LowMemoryObserver::SetLowMemoryMargin(200); |
| 586 } else { | 593 } else { |
| 587 LOG(WARNING) << "low_mem: Part of 'default' experiment"; | 594 LOG(WARNING) << "low_mem: Part of 'default' experiment"; |
| 588 } | 595 } |
| 589 } | 596 } |
| 590 } | 597 } |
| OLD | NEW |