| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_investigator.h" | 5 #include "components/signin/core/browser/signin_investigator.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
| 9 #include "components/signin/core/browser/signin_metrics.h" | 9 #include "components/signin/core/browser/signin_metrics.h" |
| 10 #include "components/signin/core/common/signin_pref_names.h" | 10 #include "components/signin/core/common/signin_pref_names.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 } | 21 } |
| 22 } // namespace | 22 } // namespace |
| 23 | 23 |
| 24 SigninInvestigator::SigninInvestigator(const std::string& current_email, | 24 SigninInvestigator::SigninInvestigator(const std::string& current_email, |
| 25 const std::string& current_id, | 25 const std::string& current_id, |
| 26 DependencyProvider* provider) | 26 DependencyProvider* provider) |
| 27 : current_email_(current_email), | 27 : current_email_(current_email), |
| 28 current_id_(current_id), | 28 current_id_(current_id), |
| 29 provider_(provider) { | 29 provider_(provider) { |
| 30 DCHECK(!current_email_.empty()); | 30 DCHECK(!current_email_.empty()); |
| 31 DCHECK(!current_id_.empty()); | 31 DCHECK(provider); |
| 32 } | 32 } |
| 33 | 33 |
| 34 SigninInvestigator::~SigninInvestigator() {} | 34 SigninInvestigator::~SigninInvestigator() {} |
| 35 | 35 |
| 36 bool SigninInvestigator::AreAccountsEqualWithFallback() { | 36 bool SigninInvestigator::AreAccountsEqualWithFallback() { |
| 37 const std::string last_id = | 37 const std::string last_id = |
| 38 provider_->GetPrefs()->GetString(prefs::kGoogleServicesLastAccountId); | 38 provider_->GetPrefs()->GetString(prefs::kGoogleServicesLastAccountId); |
| 39 bool same_email = gaia::AreEmailsSame( | 39 bool same_email = gaia::AreEmailsSame( |
| 40 current_email_, | 40 current_email_, |
| 41 provider_->GetPrefs()->GetString(prefs::kGoogleServicesLastUsername)); | 41 provider_->GetPrefs()->GetString(prefs::kGoogleServicesLastUsername)); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 LogSigninScenario(scenario); | 73 LogSigninScenario(scenario); |
| 74 return scenario; | 74 return scenario; |
| 75 } | 75 } |
| 76 | 76 |
| 77 bool SigninInvestigator::IsUpgradeHighRisk() { | 77 bool SigninInvestigator::IsUpgradeHighRisk() { |
| 78 // TODO(skym): Add logic to make this decision, crbug.com/572754. | 78 // TODO(skym): Add logic to make this decision, crbug.com/572754. |
| 79 return false; | 79 return false; |
| 80 } | 80 } |
| OLD | NEW |