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

Side by Side Diff: chrome/browser/signin/signin_tracker.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: rebased Created 7 years 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 #ifndef CHROME_BROWSER_SIGNIN_SIGNIN_TRACKER_H_ 5 #ifndef CHROME_BROWSER_SIGNIN_SIGNIN_TRACKER_H_
6 #define CHROME_BROWSER_SIGNIN_SIGNIN_TRACKER_H_ 6 #define CHROME_BROWSER_SIGNIN_SIGNIN_TRACKER_H_
7 7
8 #include "content/public/browser/notification_observer.h" 8 #include "content/public/browser/notification_observer.h"
9 #include "content/public/browser/notification_registrar.h" 9 #include "content/public/browser/notification_registrar.h"
10 #include "content/public/browser/notification_types.h" 10 #include "content/public/browser/notification_types.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class SigninTracker : public content::NotificationObserver, 49 class SigninTracker : public content::NotificationObserver,
50 public OAuth2TokenService::Observer { 50 public OAuth2TokenService::Observer {
51 public: 51 public:
52 class Observer { 52 class Observer {
53 public: 53 public:
54 // The signin attempt failed, and the cause is passed in |error|. 54 // The signin attempt failed, and the cause is passed in |error|.
55 virtual void SigninFailed(const GoogleServiceAuthError& error) = 0; 55 virtual void SigninFailed(const GoogleServiceAuthError& error) = 0;
56 56
57 // The signin attempt succeeded. 57 // The signin attempt succeeded.
58 virtual void SigninSuccess() = 0; 58 virtual void SigninSuccess() = 0;
59
60 // The signed in account has been merged into the content area cookie jar.
61 // This will be called only after a call to SigninSuccess().
62 virtual void MergeSessionComplete(const GoogleServiceAuthError& error) = 0;
59 }; 63 };
60 64
61 // Creates a SigninTracker that tracks the signin status on the passed 65 // Creates a SigninTracker that tracks the signin status on the passed
62 // |profile|, and notifies the |observer| on status changes. |observer| must 66 // |profile|, and notifies the |observer| on status changes. |observer| must
63 // be non-null and must outlive the SigninTracker. 67 // be non-null and must outlive the SigninTracker.
64 SigninTracker(Profile* profile, Observer* observer); 68 SigninTracker(Profile* profile, Observer* observer);
65 virtual ~SigninTracker(); 69 virtual ~SigninTracker();
66 70
67 // content::NotificationObserver implementation. 71 // content::NotificationObserver implementation.
68 virtual void Observe(int type, 72 virtual void Observe(int type,
(...skipping 14 matching lines...) Expand all
83 // Weak pointer to the observer we call when the signin state changes. 87 // Weak pointer to the observer we call when the signin state changes.
84 Observer* observer_; 88 Observer* observer_;
85 89
86 // Used to listen to notifications from the SigninManager. 90 // Used to listen to notifications from the SigninManager.
87 content::NotificationRegistrar registrar_; 91 content::NotificationRegistrar registrar_;
88 92
89 DISALLOW_COPY_AND_ASSIGN(SigninTracker); 93 DISALLOW_COPY_AND_ASSIGN(SigninTracker);
90 }; 94 };
91 95
92 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_TRACKER_H_ 96 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698