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

Unified Diff: chrome/browser/policy/device_token_fetcher.h

Issue 4949003: CrOS policies: Store device ID with device token (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix Release builds Created 10 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/policy/device_token_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/device_token_fetcher.h
diff --git a/chrome/browser/policy/device_token_fetcher.h b/chrome/browser/policy/device_token_fetcher.h
index d685f54a25a39a524bd33e96169c3091d32e10d7..066e300ce22620e7c38c5488f5a2254c5169735b 100644
--- a/chrome/browser/policy/device_token_fetcher.h
+++ b/chrome/browser/policy/device_token_fetcher.h
@@ -61,6 +61,10 @@ class DeviceTokenFetcher
// case that the token could not be fetched, an empty string is returned.
std::string GetDeviceToken();
+ // Returns the device ID for this device. If no such ID has been set yet, a
+ // new ID is generated and returned.
+ std::string GetDeviceID();
+
// True if the fetcher has a valid AuthToken for the device management server.
bool HasAuthToken() const { return !auth_token_.empty(); }
@@ -108,7 +112,8 @@ class DeviceTokenFetcher
// Saves the device management token to disk once it has been retrieved from
// the server. Must be called on the FILE thread.
static void WriteDeviceTokenToDisk(const FilePath& path,
- const std::string& token);
+ const std::string& token,
+ const std::string& device_id);
// Generates a new device ID used to register the device with the device
// management server and generate the device token.
@@ -118,6 +123,7 @@ class DeviceTokenFetcher
DeviceManagementBackend* backend_; // weak
FetcherState state_;
std::string device_token_;
+ std::string device_id_;
// Contains the AuthToken for the device management server. Empty if the
// AuthToken hasn't been issued yet or that was an error getting the
« no previous file with comments | « no previous file | chrome/browser/policy/device_token_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698