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

Side by Side Diff: components/signin/core/browser/about_signin_internals.h

Issue 602773002: Handle multiple signin_internal_uis by using a linked_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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 COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_ 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_ 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/linked_ptr.h"
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "base/observer_list.h" 13 #include "base/observer_list.h"
13 #include "base/values.h" 14 #include "base/values.h"
14 #include "components/keyed_service/core/keyed_service.h" 15 #include "components/keyed_service/core/keyed_service.h"
15 #include "components/signin/core/browser/signin_client.h" 16 #include "components/signin/core/browser/signin_client.h"
16 #include "components/signin/core/browser/signin_internals_util.h" 17 #include "components/signin/core/browser/signin_internals_util.h"
17 #include "components/signin/core/browser/signin_manager.h" 18 #include "components/signin/core/browser/signin_manager.h"
18 #include "google_apis/gaia/gaia_auth_consumer.h" 19 #include "google_apis/gaia/gaia_auth_consumer.h"
19 #include "google_apis/gaia/oauth2_token_service.h" 20 #include "google_apis/gaia/oauth2_token_service.h"
20 21
(...skipping 16 matching lines...) Expand all
37 public: 38 public:
38 class Observer { 39 class Observer {
39 public: 40 public:
40 // |info| will contain the dictionary of signin_status_ values as indicated 41 // |info| will contain the dictionary of signin_status_ values as indicated
41 // in the comments for GetSigninStatus() below. 42 // in the comments for GetSigninStatus() below.
42 virtual void OnSigninStateChanged( 43 virtual void OnSigninStateChanged(
43 scoped_ptr<base::DictionaryValue> info) = 0; 44 scoped_ptr<base::DictionaryValue> info) = 0;
44 45
45 // Notification that the cookie accounts are ready to be displayed. 46 // Notification that the cookie accounts are ready to be displayed.
46 virtual void OnCookieAccountsFetched( 47 virtual void OnCookieAccountsFetched(
47 scoped_ptr<base::DictionaryValue> info) = 0; 48 linked_ptr<base::DictionaryValue> info) = 0;
48 }; 49 };
49 50
50 AboutSigninInternals(ProfileOAuth2TokenService* token_service, 51 AboutSigninInternals(ProfileOAuth2TokenService* token_service,
51 SigninManagerBase* signin_manager); 52 SigninManagerBase* signin_manager);
52 virtual ~AboutSigninInternals(); 53 virtual ~AboutSigninInternals();
53 54
54 // Each instance of SigninInternalsUI adds itself as an observer to be 55 // Each instance of SigninInternalsUI adds itself as an observer to be
55 // notified of all updates that AboutSigninInternals receives. 56 // notified of all updates that AboutSigninInternals receives.
56 void AddSigninObserver(Observer* observer); 57 void AddSigninObserver(Observer* observer);
57 void RemoveSigninObserver(Observer* observer); 58 void RemoveSigninObserver(Observer* observer);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 207
207 ObserverList<Observer> signin_observers_; 208 ObserverList<Observer> signin_observers_;
208 209
209 scoped_ptr<SigninClient::CookieChangedCallbackList::Subscription> 210 scoped_ptr<SigninClient::CookieChangedCallbackList::Subscription>
210 cookie_changed_subscription_; 211 cookie_changed_subscription_;
211 212
212 DISALLOW_COPY_AND_ASSIGN(AboutSigninInternals); 213 DISALLOW_COPY_AND_ASSIGN(AboutSigninInternals);
213 }; 214 };
214 215
215 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_ 216 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698