| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 #endif | 122 #endif |
| 123 | 123 |
| 124 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 124 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 125 #include "chrome/browser/first_run/upgrade_util_linux.h" | 125 #include "chrome/browser/first_run/upgrade_util_linux.h" |
| 126 #endif | 126 #endif |
| 127 | 127 |
| 128 #if defined(OS_CHROMEOS) | 128 #if defined(OS_CHROMEOS) |
| 129 #include "chrome/browser/chromeos/audio_handler.h" | 129 #include "chrome/browser/chromeos/audio_handler.h" |
| 130 #include "chrome/browser/chromeos/boot_times_loader.h" | 130 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 131 #include "chrome/browser/chromeos/cros/cros_library.h" | 131 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 132 #include "chrome/browser/chromeos/cros/screen_lock_library.h" | |
| 133 #include "chrome/browser/chromeos/cros_settings.h" | 132 #include "chrome/browser/chromeos/cros_settings.h" |
| 134 #include "chrome/browser/chromeos/cros_settings_names.h" | 133 #include "chrome/browser/chromeos/cros_settings_names.h" |
| 135 #include "chrome/browser/chromeos/customization_document.h" | 134 #include "chrome/browser/chromeos/customization_document.h" |
| 136 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 135 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 137 #include "chrome/browser/chromeos/external_metrics.h" | 136 #include "chrome/browser/chromeos/external_metrics.h" |
| 138 #include "chrome/browser/chromeos/login/authenticator.h" | 137 #include "chrome/browser/chromeos/login/authenticator.h" |
| 139 #include "chrome/browser/chromeos/login/login_utils.h" | 138 #include "chrome/browser/chromeos/login/login_utils.h" |
| 140 #include "chrome/browser/chromeos/login/ownership_service.h" | 139 #include "chrome/browser/chromeos/login/ownership_service.h" |
| 141 #include "chrome/browser/chromeos/login/screen_locker.h" | 140 #include "chrome/browser/chromeos/login/screen_locker.h" |
| 142 #include "chrome/browser/chromeos/login/user_manager.h" | 141 #include "chrome/browser/chromeos/login/user_manager.h" |
| (...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1536 SetBrowserX11ErrorHandlers(); | 1535 SetBrowserX11ErrorHandlers(); |
| 1537 #endif | 1536 #endif |
| 1538 | 1537 |
| 1539 // Desktop construction occurs here, (required before profile creation). | 1538 // Desktop construction occurs here, (required before profile creation). |
| 1540 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) | 1539 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) |
| 1541 chrome_extra_parts_[i]->PostBrowserProcessInit(); | 1540 chrome_extra_parts_[i]->PostBrowserProcessInit(); |
| 1542 | 1541 |
| 1543 // Profile creation ---------------------------------------------------------- | 1542 // Profile creation ---------------------------------------------------------- |
| 1544 | 1543 |
| 1545 #if defined(OS_CHROMEOS) | 1544 #if defined(OS_CHROMEOS) |
| 1546 // Initialize the screen locker now so that it can receive | |
| 1547 // LOGIN_USER_CHANGED notification from UserManager. | |
| 1548 chromeos::ScreenLocker::InitClass(); | |
| 1549 | |
| 1550 // This forces the ProfileManager to be created and register for the | 1545 // This forces the ProfileManager to be created and register for the |
| 1551 // notification it needs to track the logged in user. | 1546 // notification it needs to track the logged in user. |
| 1552 g_browser_process->profile_manager(); | 1547 g_browser_process->profile_manager(); |
| 1553 | 1548 |
| 1554 // TODO(abarth): Should this move to InitializeNetworkOptions()? | 1549 // TODO(abarth): Should this move to InitializeNetworkOptions()? |
| 1555 // Allow access to file:// on ChromeOS for tests. | 1550 // Allow access to file:// on ChromeOS for tests. |
| 1556 if (parsed_command_line().HasSwitch(switches::kAllowFileAccess)) | 1551 if (parsed_command_line().HasSwitch(switches::kAllowFileAccess)) |
| 1557 net::URLRequest::AllowFileAccess(); | 1552 net::URLRequest::AllowFileAccess(); |
| 1558 | 1553 |
| 1559 // There are two use cases for kLoginUser: | 1554 // There are two use cases for kLoginUser: |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2132 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2127 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2133 (pre_read == "0" || pre_read == "1")) { | 2128 (pre_read == "0" || pre_read == "1")) { |
| 2134 std::string uma_name(name); | 2129 std::string uma_name(name); |
| 2135 uma_name += "_PreRead"; | 2130 uma_name += "_PreRead"; |
| 2136 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2131 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2137 AddPreReadHistogramTime(uma_name.c_str(), time); | 2132 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2138 } | 2133 } |
| 2139 #endif | 2134 #endif |
| 2140 #endif | 2135 #endif |
| 2141 } | 2136 } |
| OLD | NEW |