Commit 34b8b1f3 authored by Jun Mukai's avatar Jun Mukai Committed by Commit Bot

use random GUID for the device id of the offline demo mode

Previously the device id was extracted from the offline policy,
but that means all of the offline-enrolled device shared the same
device id (since the offline policy data is stored on the device).

This isn't a big issue as long as the device stays offline,
but we should use the generated ID to allow making the transition
to the online demo mode after the offline enrollment is conducted.

BUG=827369
TEST=manually walked through the offline enrollment

Change-Id: I0d9713d78c08fabcd0fb49326e1acca9ee578b98
Reviewed-on: https://chromium-review.googlesource.com/1147336Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
Reviewed-by: default avatarAga Wronska <agawronska@chromium.org>
Commit-Queue: Jun Mukai <mukai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582257}
parent cb7f584d
......@@ -9,6 +9,7 @@
#include "base/base64.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/guid.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/sequenced_task_runner.h"
......@@ -490,7 +491,9 @@ void EnrollmentHandlerChromeOS::OnOfflinePolicyValidated(
return;
}
device_id_ = validator->policy_data()->device_id();
// Don't use the device ID within the validated policy -- it's common among
// all of the offline-enrolled devices.
device_id_ = base::GenerateGUID();
policy_ = std::move(validator->policy());
// The steps for OAuth2 token fetching is skipped for the OFFLINE_DEMO_MODE.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment