OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/sync/signin_manager.h" | 5 #include "chrome/browser/sync/signin_manager.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "chrome/browser/net/gaia/token_service.h" | 8 #include "chrome/browser/net/gaia/token_service.h" |
9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
10 #include "chrome/browser/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/common/net/gaia/gaia_constants.h" | 11 #include "chrome/common/net/gaia/gaia_constants.h" |
12 #include "chrome/common/notification_service.h" | 12 #include "chrome/common/notification_service.h" |
13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
14 | 14 |
15 const char kGetInfoEmailKey[] = "email"; | 15 const char kGetInfoEmailKey[] = "email"; |
16 | 16 |
17 SigninManager::SigninManager() | 17 SigninManager::SigninManager() |
18 : profile_(NULL), had_two_factor_error_(false) {} | 18 : profile_(NULL), had_two_factor_error_(false) {} |
19 | 19 |
20 SigninManager::~SigninManager() {} | 20 SigninManager::~SigninManager() {} |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 bool invalid_gaia = error.state() == | 152 bool invalid_gaia = error.state() == |
153 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS; | 153 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS; |
154 if (error.state() == GoogleServiceAuthError::TWO_FACTOR || | 154 if (error.state() == GoogleServiceAuthError::TWO_FACTOR || |
155 (had_two_factor_error_ && invalid_gaia)) { | 155 (had_two_factor_error_ && invalid_gaia)) { |
156 had_two_factor_error_ = true; | 156 had_two_factor_error_ = true; |
157 return; | 157 return; |
158 } | 158 } |
159 | 159 |
160 SignOut(); | 160 SignOut(); |
161 } | 161 } |
OLD | NEW |