Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(569)

Side by Side Diff: chrome/browser/signin/signin_manager_base.h

Issue 14367029: Introduce SigninManagerDelegate and use to eliminate CookieSettings dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge LKGR Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/signin/signin_manager.cc ('k') | chrome/browser/signin/signin_manager_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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. 6 // which user is signed in.
7 // 7 //
8 // **NOTE** on semantics of SigninManager: 8 // **NOTE** on semantics of SigninManager:
9 // 9 //
10 // Once a signin is successful, the username becomes "established" and will not 10 // Once a signin is successful, the username becomes "established" and will not
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 // Details for the Notification type NOTIFICATION_GOOGLE_SIGNED_OUT. 56 // Details for the Notification type NOTIFICATION_GOOGLE_SIGNED_OUT.
57 struct GoogleServiceSignoutDetails { 57 struct GoogleServiceSignoutDetails {
58 explicit GoogleServiceSignoutDetails(const std::string& in_username) 58 explicit GoogleServiceSignoutDetails(const std::string& in_username)
59 : username(in_username) {} 59 : username(in_username) {}
60 std::string username; 60 std::string username;
61 }; 61 };
62 62
63 class SigninManagerBase : public ProfileKeyedService { 63 class SigninManagerBase : public ProfileKeyedService {
64 public: 64 public:
65 // Returns true if the cookie policy for the given profile allows cookies
66 // for the Google signin domain.
67 static bool AreSigninCookiesAllowed(Profile* profile);
68 static bool AreSigninCookiesAllowed(CookieSettings* cookie_settings);
69
70 // Returns true if the username is allowed based on the policy string. 65 // Returns true if the username is allowed based on the policy string.
71 static bool IsAllowedUsername(const std::string& username, 66 static bool IsAllowedUsername(const std::string& username,
72 const std::string& policy); 67 const std::string& policy);
73 68
74 SigninManagerBase(); 69 SigninManagerBase();
75 virtual ~SigninManagerBase(); 70 virtual ~SigninManagerBase();
76 71
77 // If user was signed in, load tokens from DB if available. 72 // If user was signed in, load tokens from DB if available.
78 void Initialize(Profile* profile); 73 void Initialize(Profile* profile);
79 bool IsInitialized() const; 74 bool IsInitialized() const;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // The list of SigninDiagnosticObservers. 163 // The list of SigninDiagnosticObservers.
169 ObserverList<signin_internals_util::SigninDiagnosticsObserver, true> 164 ObserverList<signin_internals_util::SigninDiagnosticsObserver, true>
170 signin_diagnostics_observers_; 165 signin_diagnostics_observers_;
171 166
172 base::WeakPtrFactory<SigninManagerBase> weak_pointer_factory_; 167 base::WeakPtrFactory<SigninManagerBase> weak_pointer_factory_;
173 168
174 DISALLOW_COPY_AND_ASSIGN(SigninManagerBase); 169 DISALLOW_COPY_AND_ASSIGN(SigninManagerBase);
175 }; 170 };
176 171
177 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_BASE_H_ 172 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_BASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_manager.cc ('k') | chrome/browser/signin/signin_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698