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

Unified Diff: chrome/browser/chromeos/settings/device_oauth2_token_service.h

Issue 25975002: cryptohome: Move Encrypt/DecryptWithSystemSalt() out of CryptohomeLibrary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/settings/device_oauth2_token_service.h
diff --git a/chrome/browser/chromeos/settings/device_oauth2_token_service.h b/chrome/browser/chromeos/settings/device_oauth2_token_service.h
index 08d47d5c74167f7e25817fc678ff6e4c4e4f10e9..d371153384383ef0c00b3abe465e63799ddc61bc 100644
--- a/chrome/browser/chromeos/settings/device_oauth2_token_service.h
+++ b/chrome/browser/chromeos/settings/device_oauth2_token_service.h
@@ -13,6 +13,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
#include "base/time/time.h"
+#include "chrome/browser/chromeos/settings/token_encryptor.h"
#include "google_apis/gaia/gaia_oauth_client.h"
#include "google_apis/gaia/oauth2_token_service.h"
#include "net/url_request/url_request_context_getter.h"
@@ -68,7 +69,8 @@ class DeviceOAuth2TokenService : public OAuth2TokenService {
// Use DeviceOAuth2TokenServiceFactory to get an instance of this class.
explicit DeviceOAuth2TokenService(net::URLRequestContextGetter* getter,
- PrefService* local_state);
+ PrefService* local_state,
+ TokenEncryptor* token_encryptor);
virtual ~DeviceOAuth2TokenService();
void OnValidationComplete(bool token_is_valid);
@@ -81,6 +83,10 @@ class DeviceOAuth2TokenService : public OAuth2TokenService {
// Cache the decrypted refresh token, so we only decrypt once.
std::string refresh_token_;
PrefService* local_state_;
+
+ // Used to encrypt/decrypt the refresh token.
+ scoped_ptr<TokenEncryptor> token_encryptor_;
+
DISALLOW_COPY_AND_ASSIGN(DeviceOAuth2TokenService);
};

Powered by Google App Engine
This is Rietveld 408576698