| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_manager_view.h" | 5 #include "chrome/browser/chromeos/login/login_manager_view.h" |
| 6 | 6 |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 profile, | 314 profile, |
| 315 std::wstring(), | 315 std::wstring(), |
| 316 true, | 316 true, |
| 317 &return_code); | 317 &return_code); |
| 318 } | 318 } |
| 319 | 319 |
| 320 void LoginManagerView::SetupSession(const std::string& username) { | 320 void LoginManagerView::SetupSession(const std::string& username) { |
| 321 if (observer_) { | 321 if (observer_) { |
| 322 observer_->OnExit(chromeos::ScreenObserver::LOGIN_SIGN_IN_SELECTED); | 322 observer_->OnExit(chromeos::ScreenObserver::LOGIN_SIGN_IN_SELECTED); |
| 323 } | 323 } |
| 324 if (username.find("@google.com") != std::string::npos) { | |
| 325 // This isn't thread-safe. However, the login window is specifically | |
| 326 // supposed to be run in a blocking fashion, before any other threads are | |
| 327 // created by the initial browser process. | |
| 328 CommandLine::ForCurrentProcess()->AppendSwitch( | |
| 329 switches::kAutoSSLClientAuth); | |
| 330 } | |
| 331 if (chromeos::LoginLibrary::EnsureLoaded()) | 324 if (chromeos::LoginLibrary::EnsureLoaded()) |
| 332 chromeos::LoginLibrary::Get()->StartSession(username, ""); | 325 chromeos::LoginLibrary::Get()->StartSession(username, ""); |
| 333 } | 326 } |
| 334 | 327 |
| 335 void LoginManagerView::Login() { | 328 void LoginManagerView::Login() { |
| 336 // Disallow 0 size username. | 329 // Disallow 0 size username. |
| 337 if (username_field_->text().empty()) { | 330 if (username_field_->text().empty()) { |
| 338 // Return true so that processing ends | 331 // Return true so that processing ends |
| 339 return; | 332 return; |
| 340 } | 333 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 } | 378 } |
| 386 // Return false so that processing does not end | 379 // Return false so that processing does not end |
| 387 return false; | 380 return false; |
| 388 } | 381 } |
| 389 | 382 |
| 390 void LoginManagerView::OnOSVersion( | 383 void LoginManagerView::OnOSVersion( |
| 391 chromeos::VersionLoader::Handle handle, | 384 chromeos::VersionLoader::Handle handle, |
| 392 std::string version) { | 385 std::string version) { |
| 393 os_version_label_->SetText(ASCIIToWide(version)); | 386 os_version_label_->SetText(ASCIIToWide(version)); |
| 394 } | 387 } |
| OLD | NEW |