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

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

Issue 10628008: If there is a device id use that instead of a new one for re-enrolling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/policy/cloud_policy_data_store.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/device_token_fetcher.cc
diff --git a/chrome/browser/policy/device_token_fetcher.cc b/chrome/browser/policy/device_token_fetcher.cc
index 09df87c29ee3c20b2904762dfffb791812c18038..f400a041ac7497f61ea8bab153ddc7281993d7d3 100644
--- a/chrome/browser/policy/device_token_fetcher.cc
+++ b/chrome/browser/policy/device_token_fetcher.cc
@@ -178,6 +178,8 @@ void DeviceTokenFetcher::FetchTokenInternal() {
request->set_machine_model(data_store_->machine_model());
if (data_store_->known_machine_id())
request->set_auto_enrolled(true);
+ if (data_store_->reregister())
+ request->set_reregister(true);
request_job_->Start(base::Bind(&DeviceTokenFetcher::OnTokenFetchCompleted,
base::Unretained(this)));
UMA_HISTOGRAM_ENUMERATION(kMetricToken, kMetricTokenFetchRequested,
@@ -192,6 +194,8 @@ void DeviceTokenFetcher::OnTokenFetchCompleted(
status = DM_STATUS_RESPONSE_DECODING_ERROR;
}
+ LOG_IF(ERROR, status != DM_STATUS_SUCCESS) << "DMServer returned error code: "
+ << status;
SampleErrorStatus(status);
switch (status) {
« no previous file with comments | « chrome/browser/policy/cloud_policy_data_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698