| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
| 13 #include "chrome/browser/browser_process_impl.h" | 13 #include "chrome/browser/browser_process_impl.h" |
| 14 #include "chrome/browser/chromeos/audio/audio_handler.h" | 14 #include "chrome/browser/chromeos/audio/audio_handler.h" |
| 15 #include "chrome/browser/chromeos/bluetooth/bluetooth_manager.h" | 15 #include "chrome/browser/chromeos/bluetooth/bluetooth_manager.h" |
| 16 #include "chrome/browser/chromeos/boot_times_loader.h" | 16 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 17 #include "chrome/browser/chromeos/boot_times_loader.h" | 17 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 18 #include "chrome/browser/chromeos/cros/cros_library.h" | 18 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 19 #include "chrome/browser/chromeos/cros/cros_library.h" | 19 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 20 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 20 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 21 #include "chrome/browser/chromeos/dbus/power_manager_client.h" | 21 #include "chrome/browser/chromeos/dbus/power_manager_client.h" |
| 22 #include "chrome/browser/chromeos/dbus/session_manager_client.h" | 22 #include "chrome/browser/chromeos/dbus/session_manager_client.h" |
| 23 #include "chrome/browser/chromeos/disks/disk_mount_manager.h" | 23 #include "chrome/browser/chromeos/disks/disk_mount_manager.h" |
| 24 #include "chrome/browser/chromeos/external_metrics.h" | 24 #include "chrome/browser/chromeos/external_metrics.h" |
| 25 #include "chrome/browser/chromeos/imageburner/burn_manager.h" | 25 #include "chrome/browser/chromeos/imageburner/burn_manager.h" |
| 26 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 26 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| 27 #include "chrome/browser/chromeos/input_method/xkeyboard.h" | 27 #include "chrome/browser/chromeos/input_method/xkeyboard.h" |
| 28 #include "chrome/browser/chromeos/retail_mode/retail_mode_screen_locker.h" |
| 28 #include "chrome/browser/chromeos/login/authenticator.h" | 29 #include "chrome/browser/chromeos/login/authenticator.h" |
| 29 #include "chrome/browser/chromeos/login/login_utils.h" | 30 #include "chrome/browser/chromeos/login/login_utils.h" |
| 30 #include "chrome/browser/chromeos/login/ownership_service.h" | 31 #include "chrome/browser/chromeos/login/ownership_service.h" |
| 31 #include "chrome/browser/chromeos/login/screen_locker.h" | 32 #include "chrome/browser/chromeos/login/screen_locker.h" |
| 32 #include "chrome/browser/chromeos/login/session_manager_observer.h" | 33 #include "chrome/browser/chromeos/login/session_manager_observer.h" |
| 33 #include "chrome/browser/chromeos/login/user_manager.h" | 34 #include "chrome/browser/chromeos/login/user_manager.h" |
| 34 #include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h" | 35 #include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h" |
| 35 #include "chrome/browser/chromeos/net/network_change_notifier_chromeos.h" | 36 #include "chrome/browser/chromeos/net/network_change_notifier_chromeos.h" |
| 36 #include "chrome/browser/chromeos/power/brightness_observer.h" | 37 #include "chrome/browser/chromeos/power/brightness_observer.h" |
| 37 #include "chrome/browser/chromeos/status/status_area_view_chromeos.h" | 38 #include "chrome/browser/chromeos/status/status_area_view_chromeos.h" |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 #endif | 357 #endif |
| 357 | 358 |
| 358 // Trigger prefetching of ownership status. | 359 // Trigger prefetching of ownership status. |
| 359 chromeos::OwnershipService::GetSharedInstance()->Prewarm(); | 360 chromeos::OwnershipService::GetSharedInstance()->Prewarm(); |
| 360 | 361 |
| 361 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 362 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
| 362 // -- just before CreateProfile(). | 363 // -- just before CreateProfile(). |
| 363 | 364 |
| 364 // Initialize the screen locker now so that it can receive | 365 // Initialize the screen locker now so that it can receive |
| 365 // LOGIN_USER_CHANGED notification from UserManager. | 366 // LOGIN_USER_CHANGED notification from UserManager. |
| 366 chromeos::ScreenLocker::InitClass(); | 367 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 368 switches::kEnableRetailMode)) { |
| 369 chromeos::RetailModeScreenLocker::InitClass(); |
| 370 } else { |
| 371 chromeos::ScreenLocker::InitClass(); |
| 372 } |
| 367 | 373 |
| 368 // This forces the ProfileManager to be created and register for the | 374 // This forces the ProfileManager to be created and register for the |
| 369 // notification it needs to track the logged in user. | 375 // notification it needs to track the logged in user. |
| 370 g_browser_process->profile_manager(); | 376 g_browser_process->profile_manager(); |
| 371 | 377 |
| 372 // TODO(abarth): Should this move to InitializeNetworkOptions()? | 378 // TODO(abarth): Should this move to InitializeNetworkOptions()? |
| 373 // Allow access to file:// on ChromeOS for tests. | 379 // Allow access to file:// on ChromeOS for tests. |
| 374 if (parsed_command_line().HasSwitch(switches::kAllowFileAccess)) | 380 if (parsed_command_line().HasSwitch(switches::kAllowFileAccess)) |
| 375 net::URLRequest::AllowFileAccess(); | 381 net::URLRequest::AllowFileAccess(); |
| 376 | 382 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 chromeos::WebSocketProxyController::Shutdown(); | 529 chromeos::WebSocketProxyController::Shutdown(); |
| 524 | 530 |
| 525 #if defined(USE_AURA) | 531 #if defined(USE_AURA) |
| 526 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell | 532 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell |
| 527 // singleton before the shell is destroyed. | 533 // singleton before the shell is destroyed. |
| 528 video_property_writer_.reset(); | 534 video_property_writer_.reset(); |
| 529 #endif | 535 #endif |
| 530 | 536 |
| 531 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); | 537 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); |
| 532 } | 538 } |
| OLD | NEW |