| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/signin/core/browser/signin_manager.h" | 5 #include "components/signin/core/browser/signin_manager.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 SetAuthenticatedUsername(username); | 370 SetAuthenticatedUsername(username); |
| 371 possibly_invalid_username_.clear(); | 371 possibly_invalid_username_.clear(); |
| 372 | 372 |
| 373 FOR_EACH_OBSERVER( | 373 FOR_EACH_OBSERVER( |
| 374 Observer, | 374 Observer, |
| 375 observer_list_, | 375 observer_list_, |
| 376 GoogleSigninSucceeded(GetAuthenticatedUsername(), password_)); | 376 GoogleSigninSucceeded(GetAuthenticatedUsername(), password_)); |
| 377 | 377 |
| 378 client_->GoogleSigninSucceeded(GetAuthenticatedUsername(), password_); | 378 client_->GoogleSigninSucceeded(GetAuthenticatedUsername(), password_); |
| 379 | 379 |
| 380 signin_metrics::LogSigninProfile(client_->IsFirstRun(), |
| 381 client_->GetInstallDate()); |
| 382 |
| 380 password_.clear(); // Don't need it anymore. | 383 password_.clear(); // Don't need it anymore. |
| 381 DisableOneClickSignIn(client_->GetPrefs()); // Don't ever offer again. | 384 DisableOneClickSignIn(client_->GetPrefs()); // Don't ever offer again. |
| 382 } | 385 } |
| 383 | 386 |
| 384 void SigninManager::ProhibitSignout(bool prohibit_signout) { | 387 void SigninManager::ProhibitSignout(bool prohibit_signout) { |
| 385 prohibit_signout_ = prohibit_signout; | 388 prohibit_signout_ = prohibit_signout; |
| 386 } | 389 } |
| 387 | 390 |
| 388 bool SigninManager::IsSignoutProhibited() const { return prohibit_signout_; } | 391 bool SigninManager::IsSignoutProhibited() const { return prohibit_signout_; } |
| OLD | NEW |