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 // The signin manager encapsulates some functionality tracking | 5 // The signin manager encapsulates some functionality tracking |
6 // which user is signed in. See SigninManagerBase for full description of | 6 // which user is signed in. See SigninManagerBase for full description of |
7 // responsibilities. The class defined in this file provides functionality | 7 // responsibilities. The class defined in this file provides functionality |
8 // required by all platforms except Chrome OS. | 8 // required by all platforms except Chrome OS. |
9 // | 9 // |
10 // When a user is signed in, a ClientLogin request is run on their behalf. | 10 // When a user is signed in, a ClientLogin request is run on their behalf. |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "base/compiler_specific.h" | 27 #include "base/compiler_specific.h" |
28 #include "base/gtest_prod_util.h" | 28 #include "base/gtest_prod_util.h" |
29 #include "base/logging.h" | 29 #include "base/logging.h" |
30 #include "base/memory/scoped_ptr.h" | 30 #include "base/memory/scoped_ptr.h" |
31 #include "base/observer_list.h" | 31 #include "base/observer_list.h" |
32 #include "base/prefs/pref_change_registrar.h" | 32 #include "base/prefs/pref_change_registrar.h" |
33 #include "base/prefs/pref_member.h" | 33 #include "base/prefs/pref_member.h" |
34 #include "components/keyed_service/core/keyed_service.h" | 34 #include "components/keyed_service/core/keyed_service.h" |
35 #include "components/signin/core/browser/signin_internals_util.h" | 35 #include "components/signin/core/browser/signin_internals_util.h" |
36 #include "components/signin/core/browser/signin_manager_base.h" | 36 #include "components/signin/core/browser/signin_manager_base.h" |
| 37 #include "components/signin/core/browser/signin_metrics.h" |
37 #include "google_apis/gaia/google_service_auth_error.h" | 38 #include "google_apis/gaia/google_service_auth_error.h" |
38 #include "google_apis/gaia/merge_session_helper.h" | 39 #include "google_apis/gaia/merge_session_helper.h" |
39 #include "net/cookies/canonical_cookie.h" | 40 #include "net/cookies/canonical_cookie.h" |
40 | 41 |
41 class PrefService; | 42 class PrefService; |
42 class ProfileOAuth2TokenService; | 43 class ProfileOAuth2TokenService; |
43 class SigninAccountIdHelper; | 44 class SigninAccountIdHelper; |
44 class SigninClient; | 45 class SigninClient; |
45 | 46 |
46 class SigninManager : public SigninManagerBase { | 47 class SigninManager : public SigninManagerBase { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 const std::string& password, | 81 const std::string& password, |
81 const OAuthTokenFetchedCallback& oauth_fetched_callback); | 82 const OAuthTokenFetchedCallback& oauth_fetched_callback); |
82 | 83 |
83 // Copies auth credentials from one SigninManager to this one. This is used | 84 // Copies auth credentials from one SigninManager to this one. This is used |
84 // when creating a new profile during the signin process to transfer the | 85 // when creating a new profile during the signin process to transfer the |
85 // in-progress credentials to the new profile. | 86 // in-progress credentials to the new profile. |
86 virtual void CopyCredentialsFrom(const SigninManager& source); | 87 virtual void CopyCredentialsFrom(const SigninManager& source); |
87 | 88 |
88 // Sign a user out, removing the preference, erasing all keys | 89 // Sign a user out, removing the preference, erasing all keys |
89 // associated with the user, and canceling all auth in progress. | 90 // associated with the user, and canceling all auth in progress. |
90 virtual void SignOut(); | 91 virtual void SignOut(signin_metrics::ProfileSignout signout_source_metric); |
91 | 92 |
92 // On platforms where SigninManager is responsible for dealing with | 93 // On platforms where SigninManager is responsible for dealing with |
93 // invalid username policy updates, we need to check this during | 94 // invalid username policy updates, we need to check this during |
94 // initialization and sign the user out. | 95 // initialization and sign the user out. |
95 virtual void Initialize(PrefService* local_state) OVERRIDE; | 96 virtual void Initialize(PrefService* local_state) OVERRIDE; |
96 virtual void Shutdown() OVERRIDE; | 97 virtual void Shutdown() OVERRIDE; |
97 | 98 |
98 // Invoked from an OAuthTokenFetchedCallback to complete user signin. | 99 // Invoked from an OAuthTokenFetchedCallback to complete user signin. |
99 virtual void CompletePendingSignin(); | 100 virtual void CompletePendingSignin(); |
100 | 101 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 212 |
212 // Helper to merge signed in account into the content area. | 213 // Helper to merge signed in account into the content area. |
213 scoped_ptr<MergeSessionHelper> merge_session_helper_; | 214 scoped_ptr<MergeSessionHelper> merge_session_helper_; |
214 | 215 |
215 DISALLOW_COPY_AND_ASSIGN(SigninManager); | 216 DISALLOW_COPY_AND_ASSIGN(SigninManager); |
216 }; | 217 }; |
217 | 218 |
218 #endif // !defined(OS_CHROMEOS) | 219 #endif // !defined(OS_CHROMEOS) |
219 | 220 |
220 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_MANAGER_H_ | 221 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_MANAGER_H_ |
OLD | NEW |