| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 #include "chrome/browser/chromeos/cros/screen_lock_library.h" | 133 #include "chrome/browser/chromeos/cros/screen_lock_library.h" |
| 134 #include "chrome/browser/chromeos/cros_settings_names.h" | 134 #include "chrome/browser/chromeos/cros_settings_names.h" |
| 135 #include "chrome/browser/chromeos/customization_document.h" | 135 #include "chrome/browser/chromeos/customization_document.h" |
| 136 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 136 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 137 #include "chrome/browser/chromeos/external_metrics.h" | 137 #include "chrome/browser/chromeos/external_metrics.h" |
| 138 #include "chrome/browser/chromeos/login/authenticator.h" | 138 #include "chrome/browser/chromeos/login/authenticator.h" |
| 139 #include "chrome/browser/chromeos/login/login_utils.h" | 139 #include "chrome/browser/chromeos/login/login_utils.h" |
| 140 #include "chrome/browser/chromeos/login/ownership_service.h" | 140 #include "chrome/browser/chromeos/login/ownership_service.h" |
| 141 #include "chrome/browser/chromeos/login/screen_locker.h" | 141 #include "chrome/browser/chromeos/login/screen_locker.h" |
| 142 #include "chrome/browser/chromeos/login/user_manager.h" | 142 #include "chrome/browser/chromeos/login/user_manager.h" |
| 143 #include "chrome/browser/chromeos/status/status_area_view_chromeos.h" |
| 143 #include "chrome/browser/chromeos/system/runtime_environment.h" | 144 #include "chrome/browser/chromeos/system/runtime_environment.h" |
| 144 #include "chrome/browser/chromeos/system_key_event_listener.h" | 145 #include "chrome/browser/chromeos/system_key_event_listener.h" |
| 145 #include "chrome/browser/chromeos/user_cros_settings_provider.h" | 146 #include "chrome/browser/chromeos/user_cros_settings_provider.h" |
| 146 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" | 147 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" |
| 147 #include "chrome/browser/oom_priority_manager.h" | 148 #include "chrome/browser/oom_priority_manager.h" |
| 148 #include "chrome/browser/ui/views/browser_dialogs.h" | 149 #include "chrome/browser/ui/views/browser_dialogs.h" |
| 149 #endif | 150 #endif |
| 150 | 151 |
| 151 // TODO(port): several win-only methods have been pulled out of this, but | 152 // TODO(port): several win-only methods have been pulled out of this, but |
| 152 // BrowserMain() as a whole needs to be broken apart so that it's usable by | 153 // BrowserMain() as a whole needs to be broken apart so that it's usable by |
| (...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1524 VLOG(1) << "Relaunching browser for user: " << username; | 1525 VLOG(1) << "Relaunching browser for user: " << username; |
| 1525 chromeos::UserManager::Get()->UserLoggedIn(username); | 1526 chromeos::UserManager::Get()->UserLoggedIn(username); |
| 1526 | 1527 |
| 1527 // Redirects Chrome logging to the user data dir. | 1528 // Redirects Chrome logging to the user data dir. |
| 1528 logging::RedirectChromeLogging(parsed_command_line()); | 1529 logging::RedirectChromeLogging(parsed_command_line()); |
| 1529 | 1530 |
| 1530 // Initialize user policy before creating the profile so the profile | 1531 // Initialize user policy before creating the profile so the profile |
| 1531 // initialization code sees policy settings. | 1532 // initialization code sees policy settings. |
| 1532 g_browser_process->browser_policy_connector()->InitializeUserPolicy( | 1533 g_browser_process->browser_policy_connector()->InitializeUserPolicy( |
| 1533 username, false /* wait_for_policy_fetch */); | 1534 username, false /* wait_for_policy_fetch */); |
| 1535 } else if (parsed_command_line().HasSwitch(switches::kLoginManager)) { |
| 1536 // Initialize status area mode early on. |
| 1537 chromeos::StatusAreaViewChromeos::screen_mode = |
| 1538 chromeos::StatusAreaViewChromeos::LOGIN_MODE_WEBUI; |
| 1534 } | 1539 } |
| 1535 #endif | 1540 #endif |
| 1536 | 1541 |
| 1537 if (is_first_run) { | 1542 if (is_first_run) { |
| 1538 // Warn the ProfileManager that an import process will run, possibly | 1543 // Warn the ProfileManager that an import process will run, possibly |
| 1539 // locking the WebDataService directory of the next Profile created. | 1544 // locking the WebDataService directory of the next Profile created. |
| 1540 g_browser_process->profile_manager()->SetWillImport(); | 1545 g_browser_process->profile_manager()->SetWillImport(); |
| 1541 } | 1546 } |
| 1542 | 1547 |
| 1543 profile_ = CreateProfile(parameters(), user_data_dir, parsed_command_line()); | 1548 profile_ = CreateProfile(parameters(), user_data_dir, parsed_command_line()); |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2072 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2077 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2073 (pre_read == "0" || pre_read == "1")) { | 2078 (pre_read == "0" || pre_read == "1")) { |
| 2074 std::string uma_name(name); | 2079 std::string uma_name(name); |
| 2075 uma_name += "_PreRead"; | 2080 uma_name += "_PreRead"; |
| 2076 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2081 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2077 AddPreReadHistogramTime(uma_name.c_str(), time); | 2082 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2078 } | 2083 } |
| 2079 #endif | 2084 #endif |
| 2080 #endif | 2085 #endif |
| 2081 } | 2086 } |
| OLD | NEW |