| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 #include "chrome/common/logging_chrome.h" | 61 #include "chrome/common/logging_chrome.h" |
| 62 #include "chrome/common/pref_names.h" | 62 #include "chrome/common/pref_names.h" |
| 63 #include "chromeos/dbus/dbus_thread_manager.h" | 63 #include "chromeos/dbus/dbus_thread_manager.h" |
| 64 #include "chromeos/dbus/power_manager_client.h" | 64 #include "chromeos/dbus/power_manager_client.h" |
| 65 #include "chromeos/dbus/session_manager_client.h" | 65 #include "chromeos/dbus/session_manager_client.h" |
| 66 #include "content/public/browser/notification_service.h" | 66 #include "content/public/browser/notification_service.h" |
| 67 #include "content/public/common/main_function_params.h" | 67 #include "content/public/common/main_function_params.h" |
| 68 #include "grit/platform_locale_settings.h" | 68 #include "grit/platform_locale_settings.h" |
| 69 #include "net/base/network_change_notifier.h" | 69 #include "net/base/network_change_notifier.h" |
| 70 #include "net/url_request/url_request.h" | 70 #include "net/url_request/url_request.h" |
| 71 #include "net/url_request/url_request_file_job.h" |
| 71 #include "ui/base/l10n/l10n_util.h" | 72 #include "ui/base/l10n/l10n_util.h" |
| 72 | 73 |
| 73 | 74 |
| 74 | 75 |
| 75 class MessageLoopObserver : public MessageLoopForUI::Observer { | 76 class MessageLoopObserver : public MessageLoopForUI::Observer { |
| 76 virtual base::EventStatus WillProcessEvent( | 77 virtual base::EventStatus WillProcessEvent( |
| 77 const base::NativeEvent& event) OVERRIDE { | 78 const base::NativeEvent& event) OVERRIDE { |
| 78 return base::EVENT_CONTINUE; | 79 return base::EVENT_CONTINUE; |
| 79 } | 80 } |
| 80 | 81 |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 chromeos::ScreenLocker::InitClass(); | 332 chromeos::ScreenLocker::InitClass(); |
| 332 } | 333 } |
| 333 | 334 |
| 334 // This forces the ProfileManager to be created and register for the | 335 // This forces the ProfileManager to be created and register for the |
| 335 // notification it needs to track the logged in user. | 336 // notification it needs to track the logged in user. |
| 336 g_browser_process->profile_manager(); | 337 g_browser_process->profile_manager(); |
| 337 | 338 |
| 338 // TODO(abarth): Should this move to InitializeNetworkOptions()? | 339 // TODO(abarth): Should this move to InitializeNetworkOptions()? |
| 339 // Allow access to file:// on ChromeOS for tests. | 340 // Allow access to file:// on ChromeOS for tests. |
| 340 if (parsed_command_line().HasSwitch(switches::kAllowFileAccess)) | 341 if (parsed_command_line().HasSwitch(switches::kAllowFileAccess)) |
| 341 net::URLRequest::AllowFileAccess(); | 342 net::URLRequestFileJob::AllowAccessToAllFiles(); |
| 342 | 343 |
| 343 // There are two use cases for kLoginUser: | 344 // There are two use cases for kLoginUser: |
| 344 // 1) if passed in tandem with kLoginPassword, to drive a "StubLogin" | 345 // 1) if passed in tandem with kLoginPassword, to drive a "StubLogin" |
| 345 // 2) if passed alone, to signal that the indicated user has already | 346 // 2) if passed alone, to signal that the indicated user has already |
| 346 // logged in and we should behave accordingly. | 347 // logged in and we should behave accordingly. |
| 347 // This handles case 2. | 348 // This handles case 2. |
| 348 if (parsed_command_line().HasSwitch(switches::kLoginUser) && | 349 if (parsed_command_line().HasSwitch(switches::kLoginUser) && |
| 349 !parsed_command_line().HasSwitch(switches::kLoginPassword)) { | 350 !parsed_command_line().HasSwitch(switches::kLoginPassword)) { |
| 350 std::string username = | 351 std::string username = |
| 351 parsed_command_line().GetSwitchValueASCII(switches::kLoginUser); | 352 parsed_command_line().GetSwitchValueASCII(switches::kLoginUser); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 | 494 |
| 494 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell | 495 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell |
| 495 // singleton before the shell is destroyed. | 496 // singleton before the shell is destroyed. |
| 496 video_property_writer_.reset(); | 497 video_property_writer_.reset(); |
| 497 // Remove PowerButtonObserver attached to a D-Bus client before | 498 // Remove PowerButtonObserver attached to a D-Bus client before |
| 498 // DBusThreadManager is shut down. | 499 // DBusThreadManager is shut down. |
| 499 power_button_observer_.reset(); | 500 power_button_observer_.reset(); |
| 500 | 501 |
| 501 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); | 502 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); |
| 502 } | 503 } |
| OLD | NEW |