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

Side by Side Diff: chrome/browser/extensions/token_cache/token_cache_service.h

Issue 502343002: Add account_id to signin manager notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@isauth
Patch Set: Fix android trybots 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
« no previous file with comments | « no previous file | chrome/browser/extensions/token_cache/token_cache_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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_EXTENSIONS_TOKEN_CACHE_TOKEN_CACHE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_TOKEN_CACHE_TOKEN_CACHE_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_TOKEN_CACHE_TOKEN_CACHE_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_TOKEN_CACHE_TOKEN_CACHE_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 28 matching lines...) Expand all
39 std::string RetrieveToken(const std::string& token_name); 39 std::string RetrieveToken(const std::string& token_name);
40 40
41 // KeyedService: 41 // KeyedService:
42 virtual void Shutdown() OVERRIDE; 42 virtual void Shutdown() OVERRIDE;
43 43
44 private: 44 private:
45 friend class TokenCacheTest; 45 friend class TokenCacheTest;
46 FRIEND_TEST_ALL_PREFIXES(TokenCacheTest, SignoutTest); 46 FRIEND_TEST_ALL_PREFIXES(TokenCacheTest, SignoutTest);
47 47
48 // SigninManagerBase::Observer: 48 // SigninManagerBase::Observer:
49 virtual void GoogleSignedOut(const std::string& username) OVERRIDE; 49 virtual void GoogleSignedOut(const std::string& account_id,
50 const std::string& username) OVERRIDE;
50 51
51 struct TokenCacheData { 52 struct TokenCacheData {
52 std::string token; 53 std::string token;
53 base::Time expiration_time; 54 base::Time expiration_time;
54 }; 55 };
55 56
56 // Map the token name (string) to token data. 57 // Map the token name (string) to token data.
57 std::map<std::string, TokenCacheData> token_cache_; 58 std::map<std::string, TokenCacheData> token_cache_;
58 const Profile* const profile_; 59 const Profile* const profile_;
59 60
60 DISALLOW_COPY_AND_ASSIGN(TokenCacheService); 61 DISALLOW_COPY_AND_ASSIGN(TokenCacheService);
61 }; 62 };
62 63
63 } // namespace extensions 64 } // namespace extensions
64 65
65 #endif // CHROME_BROWSER_EXTENSIONS_TOKEN_CACHE_TOKEN_CACHE_SERVICE_H_ 66 #endif // CHROME_BROWSER_EXTENSIONS_TOKEN_CACHE_TOKEN_CACHE_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/token_cache/token_cache_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698