Chromium Code Reviews| 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/login/login_utils.h" | 5 #include "chrome/browser/chromeos/login/login_utils.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 #include "components/user_manager/user.h" | 83 #include "components/user_manager/user.h" |
| 84 #include "components/user_manager/user_manager.h" | 84 #include "components/user_manager/user_manager.h" |
| 85 #include "content/public/browser/browser_thread.h" | 85 #include "content/public/browser/browser_thread.h" |
| 86 #include "content/public/browser/notification_service.h" | 86 #include "content/public/browser/notification_service.h" |
| 87 #include "google_apis/gaia/gaia_auth_consumer.h" | 87 #include "google_apis/gaia/gaia_auth_consumer.h" |
| 88 #include "net/base/network_change_notifier.h" | 88 #include "net/base/network_change_notifier.h" |
| 89 #include "net/url_request/url_request_context.h" | 89 #include "net/url_request/url_request_context.h" |
| 90 #include "net/url_request/url_request_context_getter.h" | 90 #include "net/url_request/url_request_context_getter.h" |
| 91 #include "url/gurl.h" | 91 #include "url/gurl.h" |
| 92 | 92 |
| 93 #if defined(USE_ATHENA) | |
| 94 #include "athena/extensions/public/extensions_delegate.h" | |
| 95 #include "athena/main/athena_launcher.h" | |
| 96 #endif | |
| 97 | |
| 93 using content::BrowserThread; | 98 using content::BrowserThread; |
| 94 | 99 |
| 95 namespace { | 100 namespace { |
| 96 | 101 |
| 97 void LogCustomSwitches(const std::set<std::string>& switches) { | 102 void LogCustomSwitches(const std::set<std::string>& switches) { |
| 98 if (!VLOG_IS_ON(1)) | 103 if (!VLOG_IS_ON(1)) |
| 99 return; | 104 return; |
| 100 for (std::set<std::string>::const_iterator it = switches.begin(); | 105 for (std::set<std::string>::const_iterator it = switches.begin(); |
| 101 it != switches.end(); | 106 it != switches.end(); |
| 102 ++it) { | 107 ++it) { |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 282 | 287 |
| 283 BootTimesLoader::Get()->AddLoginTimeMarker("BrowserLaunched", false); | 288 BootTimesLoader::Get()->AddLoginTimeMarker("BrowserLaunched", false); |
| 284 | 289 |
| 285 VLOG(1) << "Launching browser..."; | 290 VLOG(1) << "Launching browser..."; |
| 286 TRACE_EVENT0("login", "LaunchBrowser"); | 291 TRACE_EVENT0("login", "LaunchBrowser"); |
| 287 StartupBrowserCreator browser_creator; | 292 StartupBrowserCreator browser_creator; |
| 288 int return_code; | 293 int return_code; |
| 289 chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ? | 294 chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ? |
| 290 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN; | 295 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN; |
| 291 | 296 |
| 297 #if defined(USE_ATHENA) | |
| 298 { | |
| 299 // Athena virtual keyboard initialization require file IO. | |
| 300 base::ThreadRestrictions::ScopedAllowIO allow_io; | |
|
oshima
2014/09/04 16:14:28
I think we need to move VK initialization to env.
bshe
2014/09/04 18:36:52
VK is currently initialized in ash (see https://co
Dmitry Polukhin
2014/09/05 15:05:00
It seems that ash doing something different becaus
bshe
2014/09/05 15:15:42
VK for athena is totally different as athena doesn
sadrul
2014/09/06 02:58:12
For athena_main, the keyboard is initialized befor
| |
| 301 | |
| 302 athena::ExtensionsDelegate::CreateExtensionsDelegateForChrome(profile); | |
| 303 athena::StartAthenaSessionWithContext(profile); | |
| 304 } | |
| 305 #endif | |
| 306 | |
| 292 browser_creator.LaunchBrowser(*CommandLine::ForCurrentProcess(), | 307 browser_creator.LaunchBrowser(*CommandLine::ForCurrentProcess(), |
| 293 profile, | 308 profile, |
| 294 base::FilePath(), | 309 base::FilePath(), |
| 295 chrome::startup::IS_PROCESS_STARTUP, | 310 chrome::startup::IS_PROCESS_STARTUP, |
| 296 first_run, | 311 first_run, |
| 297 &return_code); | 312 &return_code); |
| 298 | 313 |
| 299 // Triggers app launcher start page service to load start page web contents. | 314 // Triggers app launcher start page service to load start page web contents. |
| 300 app_list::StartPageService::Get(profile); | 315 app_list::StartPageService::Get(profile); |
| 301 | 316 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 486 CrosSettings* cros_settings = CrosSettings::Get(); | 501 CrosSettings* cros_settings = CrosSettings::Get(); |
| 487 bool allow_new_user = false; | 502 bool allow_new_user = false; |
| 488 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); | 503 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); |
| 489 if (allow_new_user) | 504 if (allow_new_user) |
| 490 return true; | 505 return true; |
| 491 return cros_settings->FindEmailInList( | 506 return cros_settings->FindEmailInList( |
| 492 kAccountsPrefUsers, username, wildcard_match); | 507 kAccountsPrefUsers, username, wildcard_match); |
| 493 } | 508 } |
| 494 | 509 |
| 495 } // namespace chromeos | 510 } // namespace chromeos |
| OLD | NEW |