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

Side by Side Diff: chrome/browser/chromeos/login/signin/token_handle_util.h

Issue 1191273002: ChromeOS: Show the new POD RE-AUTH ICON when users needs to re-auth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_CHROMEOS_LOGIN_SIGNIN_TOKEN_HANDLE_UTIL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_TOKEN_HANDLE_UTIL_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_TOKEN_HANDLE_UTIL_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_TOKEN_HANDLE_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // Marks current handle as invalid, new one should be obtained at next sign 45 // Marks current handle as invalid, new one should be obtained at next sign
46 // in. 46 // in.
47 void MarkHandleInvalid(const user_manager::UserID& user_id); 47 void MarkHandleInvalid(const user_manager::UserID& user_id);
48 48
49 // Indicates if token handle for |user_id| is missing or marked as invalid. 49 // Indicates if token handle for |user_id| is missing or marked as invalid.
50 bool ShouldObtainHandle(const user_manager::UserID& user_id); 50 bool ShouldObtainHandle(const user_manager::UserID& user_id);
51 51
52 // Performs token handle check for |user_id|. Will call |callback| with 52 // Performs token handle check for |user_id|. Will call |callback| with
53 // corresponding result. 53 // corresponding result.
54 void CheckToken(const user_manager::UserID& user_id, 54 // Returns true if token check successfully started. Returns false if
55 // there is already token check request for this token, and nother one is not
dzhioev (left Google) 2015/06/22 23:51:24 nit: nother -> another
Alexander Alekseev 2015/06/30 20:43:39 Done.
56 // possible now.
57 bool CheckToken(const user_manager::UserID& user_id,
55 const TokenValidationCallback& callback); 58 const TokenValidationCallback& callback);
56 59
57 // Given the OAuth |access_token| attempt to obtain token handle and store it 60 // Given the OAuth |access_token| attempt to obtain token handle and store it
58 // for |user_id|. 61 // for |user_id|.
59 void GetTokenHandle(const user_manager::UserID& user_id, 62 void GetTokenHandle(const user_manager::UserID& user_id,
60 const std::string& access_token, 63 const std::string& access_token,
61 const TokenValidationCallback& callback); 64 const TokenValidationCallback& callback);
62 65
63 private: 66 private:
64 // Associates GaiaOAuthClient::Delegate with User ID and Token. 67 // Associates GaiaOAuthClient::Delegate with User ID and Token.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 107
105 // Instance of GAIA Client. 108 // Instance of GAIA Client.
106 scoped_ptr<gaia::GaiaOAuthClient> gaia_client_; 109 scoped_ptr<gaia::GaiaOAuthClient> gaia_client_;
107 110
108 base::WeakPtrFactory<TokenHandleUtil> weak_factory_; 111 base::WeakPtrFactory<TokenHandleUtil> weak_factory_;
109 112
110 DISALLOW_COPY_AND_ASSIGN(TokenHandleUtil); 113 DISALLOW_COPY_AND_ASSIGN(TokenHandleUtil);
111 }; 114 };
112 115
113 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_TOKEN_HANDLE_UTIL_H_ 116 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_TOKEN_HANDLE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698