| 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/chromeos/chromeos_version.h" | 9 #include "base/chromeos/chromeos_version.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "chrome/browser/chromeos/power/screen_dimming_observer.h" | 43 #include "chrome/browser/chromeos/power/screen_dimming_observer.h" |
| 44 #include "chrome/browser/chromeos/power/screen_lock_observer.h" | 44 #include "chrome/browser/chromeos/power/screen_lock_observer.h" |
| 45 #include "chrome/browser/chromeos/power/video_property_writer.h" | 45 #include "chrome/browser/chromeos/power/video_property_writer.h" |
| 46 #include "chrome/browser/chromeos/system/statistics_provider.h" | 46 #include "chrome/browser/chromeos/system/statistics_provider.h" |
| 47 #include "chrome/browser/chromeos/system_key_event_listener.h" | 47 #include "chrome/browser/chromeos/system_key_event_listener.h" |
| 48 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" | 48 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" |
| 49 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" | 49 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" |
| 50 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" | 50 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" |
| 51 #include "chrome/browser/defaults.h" | 51 #include "chrome/browser/defaults.h" |
| 52 #include "chrome/browser/metrics/metrics_service.h" | 52 #include "chrome/browser/metrics/metrics_service.h" |
| 53 #include "chrome/browser/net/chrome_network_delegate.h" |
| 53 #include "chrome/browser/oom_priority_manager.h" | 54 #include "chrome/browser/oom_priority_manager.h" |
| 54 #include "chrome/browser/policy/browser_policy_connector.h" | 55 #include "chrome/browser/policy/browser_policy_connector.h" |
| 55 #include "chrome/browser/prefs/pref_service.h" | 56 #include "chrome/browser/prefs/pref_service.h" |
| 56 #include "chrome/browser/profiles/profile.h" | 57 #include "chrome/browser/profiles/profile.h" |
| 57 #include "chrome/browser/profiles/profile_manager.h" | 58 #include "chrome/browser/profiles/profile_manager.h" |
| 58 #include "chrome/browser/signin/token_service_factory.h" | 59 #include "chrome/browser/signin/token_service_factory.h" |
| 59 #include "chrome/browser/ui/views/browser_dialogs.h" | 60 #include "chrome/browser/ui/views/browser_dialogs.h" |
| 60 #include "chrome/common/chrome_notification_types.h" | 61 #include "chrome/common/chrome_notification_types.h" |
| 61 #include "chrome/common/chrome_switches.h" | 62 #include "chrome/common/chrome_switches.h" |
| 62 #include "chrome/common/logging_chrome.h" | 63 #include "chrome/common/logging_chrome.h" |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 chromeos::ScreenLocker::InitClass(); | 325 chromeos::ScreenLocker::InitClass(); |
| 325 } | 326 } |
| 326 | 327 |
| 327 // This forces the ProfileManager to be created and register for the | 328 // This forces the ProfileManager to be created and register for the |
| 328 // notification it needs to track the logged in user. | 329 // notification it needs to track the logged in user. |
| 329 g_browser_process->profile_manager(); | 330 g_browser_process->profile_manager(); |
| 330 | 331 |
| 331 // TODO(abarth): Should this move to InitializeNetworkOptions()? | 332 // TODO(abarth): Should this move to InitializeNetworkOptions()? |
| 332 // Allow access to file:// on ChromeOS for tests. | 333 // Allow access to file:// on ChromeOS for tests. |
| 333 if (parsed_command_line().HasSwitch(switches::kAllowFileAccess)) | 334 if (parsed_command_line().HasSwitch(switches::kAllowFileAccess)) |
| 334 net::URLRequest::AllowFileAccess(); | 335 ChromeNetworkDelegate::AllowAccessToAllFiles(); |
| 335 | 336 |
| 336 // There are two use cases for kLoginUser: | 337 // There are two use cases for kLoginUser: |
| 337 // 1) if passed in tandem with kLoginPassword, to drive a "StubLogin" | 338 // 1) if passed in tandem with kLoginPassword, to drive a "StubLogin" |
| 338 // 2) if passed alone, to signal that the indicated user has already | 339 // 2) if passed alone, to signal that the indicated user has already |
| 339 // logged in and we should behave accordingly. | 340 // logged in and we should behave accordingly. |
| 340 // This handles case 2. | 341 // This handles case 2. |
| 341 if (parsed_command_line().HasSwitch(switches::kLoginUser) && | 342 if (parsed_command_line().HasSwitch(switches::kLoginUser) && |
| 342 !parsed_command_line().HasSwitch(switches::kLoginPassword)) { | 343 !parsed_command_line().HasSwitch(switches::kLoginPassword)) { |
| 343 std::string username = | 344 std::string username = |
| 344 parsed_command_line().GetSwitchValueASCII(switches::kLoginUser); | 345 parsed_command_line().GetSwitchValueASCII(switches::kLoginUser); |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell | 489 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell |
| 489 // singleton before the shell is destroyed. | 490 // singleton before the shell is destroyed. |
| 490 video_property_writer_.reset(); | 491 video_property_writer_.reset(); |
| 491 | 492 |
| 492 // Detach D-Bus clients before DBusThreadManager is shut down. | 493 // Detach D-Bus clients before DBusThreadManager is shut down. |
| 493 power_button_observer_.reset(); | 494 power_button_observer_.reset(); |
| 494 screen_dimming_observer_.reset(); | 495 screen_dimming_observer_.reset(); |
| 495 | 496 |
| 496 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); | 497 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); |
| 497 } | 498 } |
| OLD | NEW |