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

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

Issue 2397263002: Add LogOut method to GaiaCookieManagerService::Observer. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | components/signin/core/browser/gaia_cookie_manager_service.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 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_GAIA_COOKIE_MANAGER_SERVICE_H_ 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_GAIA_COOKIE_MANAGER_SERVICE_H_
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_GAIA_COOKIE_MANAGER_SERVICE_H_ 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_GAIA_COOKIE_MANAGER_SERVICE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 GaiaCookieRequestType request_type_; 74 GaiaCookieRequestType request_type_;
75 std::string account_id_; 75 std::string account_id_;
76 std::string source_; 76 std::string source_;
77 }; 77 };
78 78
79 class Observer { 79 class Observer {
80 public: 80 public:
81 // Called whenever a merge session is completed. The account that was 81 // Called whenever a merge session is completed. The account that was
82 // merged is given by |account_id|. If |error| is equal to 82 // merged is given by |account_id|. If |error| is equal to
83 // GoogleServiceAuthError::AuthErrorNone() then the merge succeeeded. 83 // GoogleServiceAuthError::AuthErrorNone() then the merge succeeded.
84 virtual void OnAddAccountToCookieCompleted( 84 virtual void OnAddAccountToCookieCompleted(
85 const std::string& account_id, 85 const std::string& account_id,
86 const GoogleServiceAuthError& error) {} 86 const GoogleServiceAuthError& error) {}
87 87
88 // Called whenever a logout is completed. If |error| is equal to
89 // GoogleServiceAuthError::AuthErrorNone() then the logout succeeded.
90 virtual void OnLogOutAccountsFromCookieCompleted(
91 const GoogleServiceAuthError& error) {}
92
88 // Called whenever the GaiaCookieManagerService's list of GAIA accounts is 93 // Called whenever the GaiaCookieManagerService's list of GAIA accounts is
89 // updated. The GCMS monitors the APISID cookie and triggers a /ListAccounts 94 // updated. The GCMS monitors the APISID cookie and triggers a /ListAccounts
90 // call on change. The GCMS will also call ListAccounts upon the first call 95 // call on change. The GCMS will also call ListAccounts upon the first call
91 // to ListAccounts(). The GCMS will delay calling ListAccounts if other 96 // to ListAccounts(). The GCMS will delay calling ListAccounts if other
92 // requests are in queue that would modify the APISID cookie. 97 // requests are in queue that would modify the APISID cookie.
93 // If the ListAccounts call fails and the GCMS cannot recover, the reason 98 // If the ListAccounts call fails and the GCMS cannot recover, the reason
94 // is passed in |error|. 99 // is passed in |error|.
95 virtual void OnGaiaAccountsInCookieUpdated( 100 virtual void OnGaiaAccountsInCookieUpdated(
96 const std::vector<gaia::ListedAccount>& accounts, 101 const std::vector<gaia::ListedAccount>& accounts,
97 const std::vector<gaia::ListedAccount>& signed_out_accounts, 102 const std::vector<gaia::ListedAccount>& signed_out_accounts,
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 321
317 std::vector<gaia::ListedAccount> listed_accounts_; 322 std::vector<gaia::ListedAccount> listed_accounts_;
318 std::vector<gaia::ListedAccount> signed_out_accounts_; 323 std::vector<gaia::ListedAccount> signed_out_accounts_;
319 324
320 bool list_accounts_stale_; 325 bool list_accounts_stale_;
321 326
322 DISALLOW_COPY_AND_ASSIGN(GaiaCookieManagerService); 327 DISALLOW_COPY_AND_ASSIGN(GaiaCookieManagerService);
323 }; 328 };
324 329
325 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_GAIA_COOKIE_MANAGER_SERVICE_H_ 330 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_GAIA_COOKIE_MANAGER_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | components/signin/core/browser/gaia_cookie_manager_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698