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

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

Issue 110373007: Delay loading the NTP after sign in until MergeSession has been performed in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo in chromeos Created 6 years, 11 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
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. 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 13 matching lines...) Expand all
24 #include <string> 24 #include <string>
25 25
26 #include "base/compiler_specific.h" 26 #include "base/compiler_specific.h"
27 #include "base/gtest_prod_util.h" 27 #include "base/gtest_prod_util.h"
28 #include "base/logging.h" 28 #include "base/logging.h"
29 #include "base/memory/scoped_ptr.h" 29 #include "base/memory/scoped_ptr.h"
30 #include "base/observer_list.h" 30 #include "base/observer_list.h"
31 #include "base/prefs/pref_change_registrar.h" 31 #include "base/prefs/pref_change_registrar.h"
32 #include "base/prefs/pref_member.h" 32 #include "base/prefs/pref_member.h"
33 #include "chrome/browser/profiles/profile.h" 33 #include "chrome/browser/profiles/profile.h"
34 #include "chrome/browser/signin/google_auto_login_helper.h"
34 #include "chrome/browser/signin/signin_internals_util.h" 35 #include "chrome/browser/signin/signin_internals_util.h"
35 #include "chrome/browser/signin/signin_manager_base.h" 36 #include "chrome/browser/signin/signin_manager_base.h"
36 #include "components/browser_context_keyed_service/browser_context_keyed_service .h" 37 #include "components/browser_context_keyed_service/browser_context_keyed_service .h"
37 #include "content/public/browser/notification_observer.h" 38 #include "content/public/browser/notification_observer.h"
38 #include "content/public/browser/notification_registrar.h" 39 #include "content/public/browser/notification_registrar.h"
39 #include "google_apis/gaia/gaia_auth_consumer.h" 40 #include "google_apis/gaia/gaia_auth_consumer.h"
40 #include "google_apis/gaia/google_service_auth_error.h" 41 #include "google_apis/gaia/google_service_auth_error.h"
41 #include "net/cookies/canonical_cookie.h" 42 #include "net/cookies/canonical_cookie.h"
42 43
43 class CookieSettings; 44 class CookieSettings;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // if it is safe to sign the user in from the current context (see 179 // if it is safe to sign the user in from the current context (see
179 // OneClickSigninHelper). All of this tracking state is reset once the 180 // OneClickSigninHelper). All of this tracking state is reset once the
180 // renderer process terminates. 181 // renderer process terminates.
181 // 182 //
182 // N.B. This is the id returned by RenderProcessHost::GetID(). 183 // N.B. This is the id returned by RenderProcessHost::GetID().
183 void SetSigninProcess(int host_id); 184 void SetSigninProcess(int host_id);
184 void ClearSigninProcess(); 185 void ClearSigninProcess();
185 bool IsSigninProcess(int host_id) const; 186 bool IsSigninProcess(int host_id) const;
186 bool HasSigninProcess() const; 187 bool HasSigninProcess() const;
187 188
189 // Add or remove observers for the merge session notification.
190 void AddMergeSessionObserver(GoogleAutoLoginHelper::Observer* observer);
191 void RemoveMergeSessionObserver(GoogleAutoLoginHelper::Observer* observer);
192
188 protected: 193 protected:
189 // Flag saying whether signing out is allowed. 194 // Flag saying whether signing out is allowed.
190 bool prohibit_signout_; 195 bool prohibit_signout_;
191 196
192 private: 197 private:
193 enum SigninType { 198 enum SigninType {
194 SIGNIN_TYPE_NONE, 199 SIGNIN_TYPE_NONE,
195 SIGNIN_TYPE_WITH_CREDENTIALS, 200 SIGNIN_TYPE_WITH_CREDENTIALS,
196 SIGNIN_TYPE_WITH_OAUTH_CODE 201 SIGNIN_TYPE_WITH_OAUTH_CODE
197 }; 202 };
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 289
285 scoped_ptr<SigninManagerDelegate> delegate_; 290 scoped_ptr<SigninManagerDelegate> delegate_;
286 291
287 // Helper object to listen for changes to signin preferences stored in non- 292 // Helper object to listen for changes to signin preferences stored in non-
288 // profile-specific local prefs (like kGoogleServicesUsernamePattern). 293 // profile-specific local prefs (like kGoogleServicesUsernamePattern).
289 PrefChangeRegistrar local_state_pref_registrar_; 294 PrefChangeRegistrar local_state_pref_registrar_;
290 295
291 // Helper object to listen for changes to the signin allowed preference. 296 // Helper object to listen for changes to the signin allowed preference.
292 BooleanPrefMember signin_allowed_; 297 BooleanPrefMember signin_allowed_;
293 298
299 // Helper to merge signed in account into the content area.
300 scoped_ptr<GoogleAutoLoginHelper> merge_session_helper_;
301
294 DISALLOW_COPY_AND_ASSIGN(SigninManager); 302 DISALLOW_COPY_AND_ASSIGN(SigninManager);
295 }; 303 };
296 304
297 #endif // !defined(OS_CHROMEOS) 305 #endif // !defined(OS_CHROMEOS)
298 306
299 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_ 307 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/google_auto_login_helper_unittest.cc ('k') | chrome/browser/signin/signin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698