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

Unified Diff: chrome/browser/policy/browser_policy_connector.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/browser_policy_connector.h ('k') | chrome/browser/policy/cloud_policy_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/browser_policy_connector.cc
diff --git a/chrome/browser/policy/browser_policy_connector.cc b/chrome/browser/policy/browser_policy_connector.cc
index 080c5c9afd050be75f371e9207bf2e287d8e862a..fa92c1ae67cb41b76a351a04cfc08d1c84e9caf8 100644
--- a/chrome/browser/policy/browser_policy_connector.cc
+++ b/chrome/browser/policy/browser_policy_connector.cc
@@ -186,15 +186,21 @@ PolicyService* BrowserPolicyConnector::CreatePolicyService(
void BrowserPolicyConnector::RegisterForDevicePolicy(
const std::string& owner_email,
const std::string& token,
- bool known_machine_id) {
+ bool known_machine_id,
+ bool reregister) {
#if defined(OS_CHROMEOS)
if (device_data_store_.get()) {
if (!device_data_store_->device_token().empty()) {
LOG(ERROR) << "Device policy data store already has a DMToken; "
<< "RegisterForDevicePolicy won't trigger a new registration.";
}
+
device_data_store_->set_user_name(owner_email);
device_data_store_->set_known_machine_id(known_machine_id);
+ if (reregister) {
+ device_data_store_->set_device_id(install_attributes_->GetDeviceId());
+ device_data_store_->set_reregister(true);
+ }
device_data_store_->set_policy_fetching_enabled(false);
device_data_store_->SetOAuthToken(token);
}
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.h ('k') | chrome/browser/policy/cloud_policy_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698