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

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

Issue 1091363002: Change ProfileDownloader to use AccountTrackerService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 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 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_ 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_ 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 AccountInfo(); 46 AccountInfo();
47 ~AccountInfo(); 47 ~AccountInfo();
48 48
49 std::string account_id; // The account ID used by OAuth2TokenService. 49 std::string account_id; // The account ID used by OAuth2TokenService.
50 std::string gaia; 50 std::string gaia;
51 std::string email; 51 std::string email;
52 std::string full_name; 52 std::string full_name;
53 std::string given_name; 53 std::string given_name;
54 std::string hosted_domain; 54 std::string hosted_domain;
55 std::string locale; 55 std::string locale;
56 std::string picture_url;
56 // TODO(rogerta): eventually this structure will include other information 57 // TODO(rogerta): eventually this structure will include other information
Mike Lerman 2015/04/20 13:25:23 Please update this TODO with the items that actual
anthonyvd 2015/04/29 15:15:08 Done.
57 // about the account, like full name, profile picture URL, etc. 58 // about the account, like full name, profile picture URL, etc.
58 59
59 bool IsValid(); 60 bool IsValid() const;
60 }; 61 };
61 62
62 // Clients of AccountTrackerService can implement this interface and register 63 // Clients of AccountTrackerService can implement this interface and register
63 // with AddObserver() to learn about account information changes. 64 // with AddObserver() to learn about account information changes.
64 class Observer { 65 class Observer {
65 public: 66 public:
66 virtual ~Observer() {} 67 virtual ~Observer() {}
67 virtual void OnAccountUpdated(const AccountInfo& info) {} 68 virtual void OnAccountUpdated(const AccountInfo& info) {}
68 virtual void OnAccountUpdateFailed(const std::string& account_id) {} 69 virtual void OnAccountUpdateFailed(const std::string& account_id) {}
69 virtual void OnAccountRemoved(const AccountInfo& info) {} 70 virtual void OnAccountRemoved(const AccountInfo& info) {}
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 std::list<std::string> pending_user_info_fetches_; 175 std::list<std::string> pending_user_info_fetches_;
175 176
176 // Holds references to refresh token annotation requests keyed by account_id. 177 // Holds references to refresh token annotation requests keyed by account_id.
177 base::ScopedPtrHashMap<std::string, RefreshTokenAnnotationRequest> 178 base::ScopedPtrHashMap<std::string, RefreshTokenAnnotationRequest>
178 refresh_token_annotation_requests_; 179 refresh_token_annotation_requests_;
179 180
180 DISALLOW_COPY_AND_ASSIGN(AccountTrackerService); 181 DISALLOW_COPY_AND_ASSIGN(AccountTrackerService);
181 }; 182 };
182 183
183 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_ 184 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698