| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 // Tells the SigninManager whether to prohibit signout for this profile. | 124 // Tells the SigninManager whether to prohibit signout for this profile. |
| 125 // If |prohibit_signout| is true, then signout will be prohibited. | 125 // If |prohibit_signout| is true, then signout will be prohibited. |
| 126 void ProhibitSignout(bool prohibit_signout); | 126 void ProhibitSignout(bool prohibit_signout); |
| 127 | 127 |
| 128 // If true, signout is prohibited for this profile (calls to SignOut() are | 128 // If true, signout is prohibited for this profile (calls to SignOut() are |
| 129 // ignored). | 129 // ignored). |
| 130 bool IsSignoutProhibited() const; | 130 bool IsSignoutProhibited() const; |
| 131 | 131 |
| 132 // Add or remove observers for the merge session notification. | 132 // Add or remove observers for the merge session notification. |
| 133 virtual void AddMergeSessionObserver( | 133 void AddMergeSessionObserver(MergeSessionHelper::Observer* observer); |
| 134 MergeSessionHelper::Observer* observer); | 134 void RemoveMergeSessionObserver(MergeSessionHelper::Observer* observer); |
| 135 virtual void RemoveMergeSessionObserver( | |
| 136 MergeSessionHelper::Observer* observer); | |
| 137 | 135 |
| 138 protected: | 136 protected: |
| 139 // Flag saying whether signing out is allowed. | 137 // Flag saying whether signing out is allowed. |
| 140 bool prohibit_signout_; | 138 bool prohibit_signout_; |
| 141 | 139 |
| 142 private: | 140 private: |
| 143 enum SigninType { SIGNIN_TYPE_NONE, SIGNIN_TYPE_WITH_REFRESH_TOKEN }; | 141 enum SigninType { SIGNIN_TYPE_NONE, SIGNIN_TYPE_WITH_REFRESH_TOKEN }; |
| 144 | 142 |
| 145 std::string SigninTypeToString(SigninType type); | 143 std::string SigninTypeToString(SigninType type); |
| 146 friend class FakeSigninManager; | 144 friend class FakeSigninManager; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 scoped_ptr<MergeSessionHelper> merge_session_helper_; | 210 scoped_ptr<MergeSessionHelper> merge_session_helper_; |
| 213 | 211 |
| 214 base::WeakPtrFactory<SigninManager> weak_pointer_factory_; | 212 base::WeakPtrFactory<SigninManager> weak_pointer_factory_; |
| 215 | 213 |
| 216 DISALLOW_COPY_AND_ASSIGN(SigninManager); | 214 DISALLOW_COPY_AND_ASSIGN(SigninManager); |
| 217 }; | 215 }; |
| 218 | 216 |
| 219 #endif // !defined(OS_CHROMEOS) | 217 #endif // !defined(OS_CHROMEOS) |
| 220 | 218 |
| 221 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_MANAGER_H_ | 219 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_MANAGER_H_ |
| OLD | NEW |