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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 #include "chrome/browser/chromeos/cros_settings.h" | 135 #include "chrome/browser/chromeos/cros_settings.h" |
136 #include "chrome/browser/chromeos/cros_settings_names.h" | 136 #include "chrome/browser/chromeos/cros_settings_names.h" |
137 #include "chrome/browser/chromeos/customization_document.h" | 137 #include "chrome/browser/chromeos/customization_document.h" |
138 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 138 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
139 #include "chrome/browser/chromeos/external_metrics.h" | 139 #include "chrome/browser/chromeos/external_metrics.h" |
140 #include "chrome/browser/chromeos/login/authenticator.h" | 140 #include "chrome/browser/chromeos/login/authenticator.h" |
141 #include "chrome/browser/chromeos/login/login_utils.h" | 141 #include "chrome/browser/chromeos/login/login_utils.h" |
142 #include "chrome/browser/chromeos/login/ownership_service.h" | 142 #include "chrome/browser/chromeos/login/ownership_service.h" |
143 #include "chrome/browser/chromeos/login/screen_locker.h" | 143 #include "chrome/browser/chromeos/login/screen_locker.h" |
144 #include "chrome/browser/chromeos/login/user_manager.h" | 144 #include "chrome/browser/chromeos/login/user_manager.h" |
| 145 #include "chrome/browser/chromeos/status/status_area_view_chromeos.h" |
145 #include "chrome/browser/chromeos/system/runtime_environment.h" | 146 #include "chrome/browser/chromeos/system/runtime_environment.h" |
146 #include "chrome/browser/chromeos/system_key_event_listener.h" | 147 #include "chrome/browser/chromeos/system_key_event_listener.h" |
147 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" | 148 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" |
148 #include "chrome/browser/oom_priority_manager.h" | 149 #include "chrome/browser/oom_priority_manager.h" |
149 #include "chrome/browser/ui/views/browser_dialogs.h" | 150 #include "chrome/browser/ui/views/browser_dialogs.h" |
150 #endif | 151 #endif |
151 | 152 |
152 // TODO(port): several win-only methods have been pulled out of this, but | 153 // TODO(port): several win-only methods have been pulled out of this, but |
153 // BrowserMain() as a whole needs to be broken apart so that it's usable by | 154 // BrowserMain() as a whole needs to be broken apart so that it's usable by |
154 // other platforms. For now, it's just a stub. This is a serious work in | 155 // other platforms. For now, it's just a stub. This is a serious work in |
(...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1556 VLOG(1) << "Relaunching browser for user: " << username; | 1557 VLOG(1) << "Relaunching browser for user: " << username; |
1557 chromeos::UserManager::Get()->UserLoggedIn(username); | 1558 chromeos::UserManager::Get()->UserLoggedIn(username); |
1558 | 1559 |
1559 // Redirects Chrome logging to the user data dir. | 1560 // Redirects Chrome logging to the user data dir. |
1560 logging::RedirectChromeLogging(parsed_command_line()); | 1561 logging::RedirectChromeLogging(parsed_command_line()); |
1561 | 1562 |
1562 // Initialize user policy before creating the profile so the profile | 1563 // Initialize user policy before creating the profile so the profile |
1563 // initialization code sees policy settings. | 1564 // initialization code sees policy settings. |
1564 g_browser_process->browser_policy_connector()->InitializeUserPolicy( | 1565 g_browser_process->browser_policy_connector()->InitializeUserPolicy( |
1565 username, false /* wait_for_policy_fetch */); | 1566 username, false /* wait_for_policy_fetch */); |
| 1567 } else if (parsed_command_line().HasSwitch(switches::kLoginManager)) { |
| 1568 // Initialize status area mode early on. |
| 1569 chromeos::StatusAreaViewChromeos:: |
| 1570 SetScreenMode(chromeos::StatusAreaViewChromeos::LOGIN_MODE_WEBUI); |
1566 } | 1571 } |
1567 #endif | 1572 #endif |
1568 | 1573 |
1569 if (is_first_run) { | 1574 if (is_first_run) { |
1570 // Warn the ProfileManager that an import process will run, possibly | 1575 // Warn the ProfileManager that an import process will run, possibly |
1571 // locking the WebDataService directory of the next Profile created. | 1576 // locking the WebDataService directory of the next Profile created. |
1572 g_browser_process->profile_manager()->SetWillImport(); | 1577 g_browser_process->profile_manager()->SetWillImport(); |
1573 } | 1578 } |
1574 | 1579 |
1575 profile_ = CreateProfile(parameters(), user_data_dir, parsed_command_line()); | 1580 profile_ = CreateProfile(parameters(), user_data_dir, parsed_command_line()); |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2109 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2114 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
2110 (pre_read == "0" || pre_read == "1")) { | 2115 (pre_read == "0" || pre_read == "1")) { |
2111 std::string uma_name(name); | 2116 std::string uma_name(name); |
2112 uma_name += "_PreRead"; | 2117 uma_name += "_PreRead"; |
2113 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2118 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
2114 AddPreReadHistogramTime(uma_name.c_str(), time); | 2119 AddPreReadHistogramTime(uma_name.c_str(), time); |
2115 } | 2120 } |
2116 #endif | 2121 #endif |
2117 #endif | 2122 #endif |
2118 } | 2123 } |
OLD | NEW |