summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-28 16:45:05 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-28 16:45:05 +0000
commit01d2d279b7769fabacac94e2b6d12ba1e18344e2 (patch)
treecd178b709e2737d5f0503d6a79fccaeb85d492ac
parent30cc154d5c043a1f04f3f364b7f0c0f1806b6eeb (diff)
downloadchromium_src-01d2d279b7769fabacac94e2b6d12ba1e18344e2.zip
chromium_src-01d2d279b7769fabacac94e2b6d12ba1e18344e2.tar.gz
chromium_src-01d2d279b7769fabacac94e2b6d12ba1e18344e2.tar.bz2
Revert r119614 "Make auto-enrollment client retry after auto-update if the modulus limit was in..."
I initially thought r119615 was the culprit but I was wrong. Only r119614 could now possibly make ExtensionApiTest.ProcessesVsTaskManager time out reliably on windows. TBR=joaodasilva@chromium.org BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/9295039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119620 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/login/base_login_display_host.cc40
-rw-r--r--chrome/browser/chromeos/login/base_login_display_host.h3
-rw-r--r--chrome/browser/policy/auto_enrollment_client.cc51
-rw-r--r--chrome/browser/policy/auto_enrollment_client.h14
-rw-r--r--chrome/browser/policy/auto_enrollment_client_unittest.cc71
-rw-r--r--chrome/browser/prefs/browser_prefs.cc4
-rw-r--r--chrome/common/pref_names.cc20
-rw-r--r--chrome/common/pref_names.h3
8 files changed, 46 insertions, 160 deletions
diff --git a/chrome/browser/chromeos/login/base_login_display_host.cc b/chrome/browser/chromeos/login/base_login_display_host.cc
index b1a0f1d..87e60dc 100644
--- a/chrome/browser/chromeos/login/base_login_display_host.cc
+++ b/chrome/browser/chromeos/login/base_login_display_host.cc
@@ -77,6 +77,18 @@ const int kBackgroundTranslate = -50;
// network requests are made while the system is idle waiting for user input.
const int64 kPolicyServiceInitializationDelayMilliseconds = 100;
+// Returns true if an auto-enrollment decision has been made and is cached in
+// local state. If so, the decision is stored in |auto_enroll|.
+bool GetAutoEnrollmentDecision(bool* auto_enroll) {
+ PrefService* local_state = g_browser_process->local_state();
+ const PrefService::Preference* pref =
+ local_state->FindPreference(prefs::kShouldAutoEnroll);
+ if (pref && !pref->IsDefaultValue())
+ return pref->GetValue()->GetAsBoolean(auto_enroll);
+ else
+ return false;
+}
+
// Determines the hardware keyboard from the given locale code
// and the OEM layout information, and saves it to "Locale State".
// The information will be used in InputMethodUtil::GetHardwareInputMethodId().
@@ -156,6 +168,13 @@ BaseLoginDisplayHost::~BaseLoginDisplayHost() {
default_host_ = NULL;
}
+// static
+void BaseLoginDisplayHost::RegisterPrefs(PrefService* local_state) {
+ local_state->RegisterBooleanPref(prefs::kShouldAutoEnroll,
+ false,
+ PrefService::UNSYNCABLE_PREF);
+}
+
////////////////////////////////////////////////////////////////////////////////
// BaseLoginDisplayHost, LoginDisplayHost implementation:
@@ -359,6 +378,16 @@ void BaseLoginDisplayHost::OnOwnershipStatusCheckDone(
return;
}
+ bool auto_enroll = false;
+ if (GetAutoEnrollmentDecision(&auto_enroll)) {
+ // The auto-enrollment protocol has executed before and reached a decision,
+ // which has been stored in |auto_enroll|.
+ VLOG(1) << "CheckForAutoEnrollment: got cached decision: " << auto_enroll;
+ if (auto_enroll)
+ ForceAutoEnrollment();
+ return;
+ }
+
// Kick off the auto-enrollment client.
if (auto_enrollment_client_.get()) {
// They client might have been started after the EULA screen, but we made
@@ -368,11 +397,6 @@ void BaseLoginDisplayHost::OnOwnershipStatusCheckDone(
// CheckForAutoEnrollment() is also called when we reach the sign-in screen,
// because that's what happens after an auto-update.
VLOG(1) << "CheckForAutoEnrollment: client already started";
-
- // If the client already started and already finished too, pass the decision
- // to the |sign_in_controller_| now.
- if (auto_enrollment_client_->should_auto_enroll())
- ForceAutoEnrollment();
} else {
VLOG(1) << "CheckForAutoEnrollment: starting auto-enrollment client";
auto_enrollment_client_.reset(policy::AutoEnrollmentClient::Create(
@@ -386,6 +410,12 @@ void BaseLoginDisplayHost::OnAutoEnrollmentClientDone() {
bool auto_enroll = auto_enrollment_client_->should_auto_enroll();
VLOG(1) << "OnAutoEnrollmentClientDone, decision is " << auto_enroll;
+ // Auto-update might be in progress and might force a reboot. Cache the
+ // decision in local_state.
+ PrefService* local_state = g_browser_process->local_state();
+ local_state->SetBoolean(prefs::kShouldAutoEnroll, auto_enroll);
+ local_state->CommitPendingWrite();
+
if (auto_enroll)
ForceAutoEnrollment();
}
diff --git a/chrome/browser/chromeos/login/base_login_display_host.h b/chrome/browser/chromeos/login/base_login_display_host.h
index b06c0cb..e474dab 100644
--- a/chrome/browser/chromeos/login/base_login_display_host.h
+++ b/chrome/browser/chromeos/login/base_login_display_host.h
@@ -41,6 +41,9 @@ class BaseLoginDisplayHost : public LoginDisplayHost,
return default_host_;
}
+ // Registers preferences in local state.
+ static void RegisterPrefs(PrefService* local_state);
+
// LoginDisplayHost implementation:
virtual void OnSessionStart() OVERRIDE;
virtual void OnCompleteLogin() OVERRIDE;
diff --git a/chrome/browser/policy/auto_enrollment_client.cc b/chrome/browser/policy/auto_enrollment_client.cc
index 30cf3b6..bab7298 100644
--- a/chrome/browser/policy/auto_enrollment_client.cc
+++ b/chrome/browser/policy/auto_enrollment_client.cc
@@ -11,13 +11,10 @@
#include "base/message_loop_proxy.h"
#include "base/metrics/histogram.h"
#include "base/string_number_conversions.h"
-#include "chrome/browser/browser_process.h"
#include "chrome/browser/policy/browser_policy_connector.h"
#include "chrome/browser/policy/device_management_service.h"
-#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/guid.h"
-#include "chrome/common/pref_names.h"
#include "crypto/sha2.h"
namespace em = enterprise_management;
@@ -71,7 +68,6 @@ namespace policy {
AutoEnrollmentClient::AutoEnrollmentClient(const base::Closure& callback,
DeviceManagementService* service,
- PrefService* local_state,
const std::string& serial_number,
int power_initial,
int power_limit)
@@ -80,8 +76,7 @@ AutoEnrollmentClient::AutoEnrollmentClient(const base::Closure& callback,
device_id_(guid::GenerateGUID()),
power_initial_(power_initial),
power_limit_(power_limit),
- device_management_service_(service),
- local_state_(local_state) {
+ device_management_service_(service) {
DCHECK_LE(power_initial_, power_limit_);
if (!serial_number.empty())
serial_number_hash_ = crypto::SHA256HashString(serial_number);
@@ -90,16 +85,6 @@ AutoEnrollmentClient::AutoEnrollmentClient(const base::Closure& callback,
AutoEnrollmentClient::~AutoEnrollmentClient() {}
// static
-void AutoEnrollmentClient::RegisterPrefs(PrefService* local_state) {
- local_state->RegisterBooleanPref(prefs::kShouldAutoEnroll,
- false,
- PrefService::UNSYNCABLE_PREF);
- local_state->RegisterIntegerPref(prefs::kAutoEnrollmentPowerLimit,
- -1,
- PrefService::UNSYNCABLE_PREF);
-}
-
-// static
bool AutoEnrollmentClient::IsDisabled() {
CommandLine* command_line = CommandLine::ForCurrentProcess();
return
@@ -137,7 +122,6 @@ AutoEnrollmentClient* AutoEnrollmentClient::Create(
return new AutoEnrollmentClient(completion_callback,
service,
- g_browser_process->local_state(),
BrowserPolicyConnector::GetSerialNumber(),
power_initial,
power_limit);
@@ -149,10 +133,7 @@ void AutoEnrollmentClient::Start() {
should_auto_enroll_ = false;
time_start_ = base::Time(); // reset to null.
- if (GetCachedDecision()) {
- VLOG(1) << "AutoEnrollmentClient: using cached decision: "
- << should_auto_enroll_;
- } else if (device_management_service_.get()) {
+ if (device_management_service_.get()) {
if (serial_number_hash_.empty()) {
LOG(ERROR) << "Failed to get the hash of the serial number, "
<< "will not attempt to auto-enroll.";
@@ -181,28 +162,6 @@ void AutoEnrollmentClient::CancelAndDeleteSoon() {
}
}
-bool AutoEnrollmentClient::GetCachedDecision() {
- const PrefService::Preference* should_enroll_pref =
- local_state_->FindPreference(prefs::kShouldAutoEnroll);
- const PrefService::Preference* previous_limit_pref =
- local_state_->FindPreference(prefs::kAutoEnrollmentPowerLimit);
- bool should_auto_enroll = false;
- int previous_limit = -1;
-
- if (!should_enroll_pref ||
- should_enroll_pref->IsDefaultValue() ||
- !should_enroll_pref->GetValue()->GetAsBoolean(&should_auto_enroll) ||
- !previous_limit_pref ||
- previous_limit_pref->IsDefaultValue() ||
- !previous_limit_pref->GetValue()->GetAsInteger(&previous_limit) ||
- power_limit_ > previous_limit) {
- return false;
- }
-
- should_auto_enroll_ = should_auto_enroll;
- return true;
-}
-
void AutoEnrollmentClient::SendRequest(int power) {
if (power < 0 || power > power_limit_ || serial_number_hash_.empty()) {
NOTREACHED();
@@ -308,12 +267,6 @@ void AutoEnrollmentClient::OnProtocolDone() {
base::TimeDelta delta = now - time_start_;
UMA_HISTOGRAM_CUSTOM_TIMES(kProtocolTime, delta, kMin, kMax, kBuckets);
time_start_ = base::Time();
-
- // The decision is cached only if the protocol was actually started, which
- // is the case only if |time_start_| was not null.
- local_state_->SetBoolean(prefs::kShouldAutoEnroll, should_auto_enroll_);
- local_state_->SetInteger(prefs::kAutoEnrollmentPowerLimit, power_limit_);
- local_state_->CommitPendingWrite();
}
base::TimeDelta delta = kZero;
if (!time_extra_start_.is_null()) {
diff --git a/chrome/browser/policy/auto_enrollment_client.h b/chrome/browser/policy/auto_enrollment_client.h
index a1ce858..91846fd 100644
--- a/chrome/browser/policy/auto_enrollment_client.h
+++ b/chrome/browser/policy/auto_enrollment_client.h
@@ -16,8 +16,6 @@
#include "chrome/browser/policy/cloud_policy_constants.h"
#include "third_party/protobuf/src/google/protobuf/repeated_field.h"
-class PrefService;
-
namespace enterprise_management {
class DeviceManagementResponse;
}
@@ -35,20 +33,15 @@ class AutoEnrollmentClient {
// |completion_callback| will be invoked on completion of the protocol, after
// Start() is invoked.
// Takes ownership of |device_management_service|.
- // The result of the protocol will be cached in |local_state|.
// |power_initial| and |power_limit| are exponents of power-of-2 values which
// will be the initial modulus and the maximum modulus used by this client.
AutoEnrollmentClient(const base::Closure& completion_callback,
DeviceManagementService* device_management_service,
- PrefService* local_state,
const std::string& serial_number,
int power_initial,
int power_limit);
virtual ~AutoEnrollmentClient();
- // Registers preferences in local state.
- static void RegisterPrefs(PrefService* local_state);
-
// Returns true if auto-enrollment is disabled in this device. In that case,
// instances returned by Create() fail immediately once Start() is invoked.
static bool IsDisabled();
@@ -74,10 +67,6 @@ class AutoEnrollmentClient {
std::string device_id() const { return device_id_; }
private:
- // Tries to load the result of a previous execution of the protocol from
- // local state. Returns true if that decision has been made and is valid.
- bool GetCachedDecision();
-
// Sends an auto-enrollment check request to the device management service.
// |power| is the power of the power-of-2 to use as a modulus for this
// request.
@@ -126,9 +115,6 @@ class AutoEnrollmentClient {
scoped_ptr<DeviceManagementService> device_management_service_;
scoped_ptr<DeviceManagementRequestJob> request_job_;
- // PrefService where the protocol's results are cached.
- PrefService* local_state_;
-
// Times used to determine the duration of the protocol, and the extra time
// needed to complete after the signin was complete.
// If |time_start_| is not null, the protocol is still running.
diff --git a/chrome/browser/policy/auto_enrollment_client_unittest.cc b/chrome/browser/policy/auto_enrollment_client_unittest.cc
index 5f2f780..c37838a 100644
--- a/chrome/browser/policy/auto_enrollment_client_unittest.cc
+++ b/chrome/browser/policy/auto_enrollment_client_unittest.cc
@@ -6,13 +6,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
-#include "base/values.h"
-#include "chrome/browser/browser_process.h"
#include "chrome/browser/policy/mock_device_management_service.h"
-#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/common/pref_names.h"
-#include "chrome/test/base/testing_browser_process.h"
-#include "chrome/test/base/testing_pref_service.h"
#include "crypto/sha2.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -35,16 +29,11 @@ using ::testing::_;
class AutoEnrollmentClientTest : public testing::Test {
protected:
AutoEnrollmentClientTest()
- : scoped_testing_local_state_(
- static_cast<TestingBrowserProcess*>(g_browser_process)),
- local_state_(scoped_testing_local_state_.Get()),
- service_(NULL),
+ : service_(NULL),
completion_callback_count_(0) {}
virtual void SetUp() OVERRIDE {
CreateClient(kSerial, 4, 8);
- ASSERT_FALSE(local_state_->GetUserPref(prefs::kShouldAutoEnroll));
- ASSERT_FALSE(local_state_->GetUserPref(prefs::kAutoEnrollmentPowerLimit));
}
void CreateClient(const std::string& serial,
@@ -59,7 +48,6 @@ class AutoEnrollmentClientTest : public testing::Test {
base::Unretained(this));
client_.reset(new AutoEnrollmentClient(callback,
service_,
- local_state_,
serial,
power_initial,
power_limit));
@@ -99,19 +87,6 @@ class AutoEnrollmentClientTest : public testing::Test {
.WillOnce(service_->SucceedJob(response));
}
- void VerifyCachedResult(bool should_enroll, int power_limit) {
- base::FundamentalValue value_should_enroll(should_enroll);
- base::FundamentalValue value_power_limit(power_limit);
- EXPECT_TRUE(Value::Equals(
- &value_should_enroll,
- local_state_->GetUserPref(prefs::kShouldAutoEnroll)));
- EXPECT_TRUE(Value::Equals(
- &value_power_limit,
- local_state_->GetUserPref(prefs::kAutoEnrollmentPowerLimit)));
- }
-
- ScopedTestingLocalState scoped_testing_local_state_;
- TestingPrefService* local_state_;
MockDeviceManagementService* service_;
scoped_ptr<AutoEnrollmentClient> client_;
em::DeviceAutoEnrollmentRequest last_request_;
@@ -130,7 +105,6 @@ TEST_F(AutoEnrollmentClientTest, NetworkFailure) {
client_->Start();
EXPECT_FALSE(client_->should_auto_enroll());
EXPECT_EQ(1, completion_callback_count_);
- VerifyCachedResult(false, 8);
}
TEST_F(AutoEnrollmentClientTest, EmptyReply) {
@@ -138,7 +112,6 @@ TEST_F(AutoEnrollmentClientTest, EmptyReply) {
client_->Start();
EXPECT_FALSE(client_->should_auto_enroll());
EXPECT_EQ(1, completion_callback_count_);
- VerifyCachedResult(false, 8);
}
TEST_F(AutoEnrollmentClientTest, ClientUploadsRightBits) {
@@ -150,7 +123,6 @@ TEST_F(AutoEnrollmentClientTest, ClientUploadsRightBits) {
EXPECT_TRUE(last_request_.has_modulus());
EXPECT_EQ(16, last_request_.modulus());
EXPECT_EQ(kSerialHash[31] & 0xf, last_request_.remainder());
- VerifyCachedResult(false, 8);
}
TEST_F(AutoEnrollmentClientTest, AskForMoreThenFail) {
@@ -160,7 +132,6 @@ TEST_F(AutoEnrollmentClientTest, AskForMoreThenFail) {
client_->Start();
EXPECT_FALSE(client_->should_auto_enroll());
EXPECT_EQ(1, completion_callback_count_);
- VerifyCachedResult(false, 8);
}
TEST_F(AutoEnrollmentClientTest, AskForMoreThenEvenMore) {
@@ -170,7 +141,6 @@ TEST_F(AutoEnrollmentClientTest, AskForMoreThenEvenMore) {
client_->Start();
EXPECT_FALSE(client_->should_auto_enroll());
EXPECT_EQ(1, completion_callback_count_);
- VerifyCachedResult(false, 8);
}
TEST_F(AutoEnrollmentClientTest, AskForLess) {
@@ -178,7 +148,6 @@ TEST_F(AutoEnrollmentClientTest, AskForLess) {
client_->Start();
EXPECT_FALSE(client_->should_auto_enroll());
EXPECT_EQ(1, completion_callback_count_);
- VerifyCachedResult(false, 8);
}
TEST_F(AutoEnrollmentClientTest, AskForSame) {
@@ -186,7 +155,6 @@ TEST_F(AutoEnrollmentClientTest, AskForSame) {
client_->Start();
EXPECT_FALSE(client_->should_auto_enroll());
EXPECT_EQ(1, completion_callback_count_);
- VerifyCachedResult(false, 8);
}
TEST_F(AutoEnrollmentClientTest, AskForTooMuch) {
@@ -194,7 +162,6 @@ TEST_F(AutoEnrollmentClientTest, AskForTooMuch) {
client_->Start();
EXPECT_FALSE(client_->should_auto_enroll());
EXPECT_EQ(1, completion_callback_count_);
- VerifyCachedResult(false, 8);
}
TEST_F(AutoEnrollmentClientTest, AskNonPowerOf2) {
@@ -208,7 +175,6 @@ TEST_F(AutoEnrollmentClientTest, AskNonPowerOf2) {
EXPECT_TRUE(last_request_.has_modulus());
EXPECT_EQ(128, last_request_.modulus());
EXPECT_EQ(kSerialHash[31] & 0x7f, last_request_.remainder());
- VerifyCachedResult(false, 8);
}
TEST_F(AutoEnrollmentClientTest, ConsumerDevice) {
@@ -216,7 +182,6 @@ TEST_F(AutoEnrollmentClientTest, ConsumerDevice) {
client_->Start();
EXPECT_FALSE(client_->should_auto_enroll());
EXPECT_EQ(1, completion_callback_count_);
- VerifyCachedResult(false, 8);
}
TEST_F(AutoEnrollmentClientTest, EnterpriseDevice) {
@@ -224,7 +189,6 @@ TEST_F(AutoEnrollmentClientTest, EnterpriseDevice) {
client_->Start();
EXPECT_TRUE(client_->should_auto_enroll());
EXPECT_EQ(1, completion_callback_count_);
- VerifyCachedResult(true, 8);
}
TEST_F(AutoEnrollmentClientTest, NoSerial) {
@@ -232,8 +196,6 @@ TEST_F(AutoEnrollmentClientTest, NoSerial) {
client_->Start();
EXPECT_FALSE(client_->should_auto_enroll());
EXPECT_EQ(1, completion_callback_count_);
- EXPECT_FALSE(local_state_->GetUserPref(prefs::kShouldAutoEnroll));
- EXPECT_FALSE(local_state_->GetUserPref(prefs::kAutoEnrollmentPowerLimit));
}
TEST_F(AutoEnrollmentClientTest, NoBitsUploaded) {
@@ -246,7 +208,6 @@ TEST_F(AutoEnrollmentClientTest, NoBitsUploaded) {
EXPECT_TRUE(last_request_.has_modulus());
EXPECT_EQ(1, last_request_.modulus());
EXPECT_EQ(0, last_request_.remainder());
- VerifyCachedResult(false, 0);
}
TEST_F(AutoEnrollmentClientTest, ManyBitsUploaded) {
@@ -262,7 +223,6 @@ TEST_F(AutoEnrollmentClientTest, ManyBitsUploaded) {
EXPECT_TRUE(last_request_.has_modulus());
EXPECT_EQ(GG_INT64_C(1) << i, last_request_.modulus());
EXPECT_EQ(bottom62 % (GG_INT64_C(1) << i), last_request_.remainder());
- VerifyCachedResult(false, i);
}
}
@@ -274,35 +234,6 @@ TEST_F(AutoEnrollmentClientTest, MoreThan32BitsUploaded) {
client_->Start();
EXPECT_TRUE(client_->should_auto_enroll());
EXPECT_EQ(1, completion_callback_count_);
- VerifyCachedResult(true, 37);
-}
-
-TEST_F(AutoEnrollmentClientTest, ReuseCachedDecision) {
- EXPECT_CALL(*service_, CreateJob(_)).Times(0);
- local_state_->SetUserPref(prefs::kShouldAutoEnroll,
- Value::CreateBooleanValue(true));
- local_state_->SetUserPref(prefs::kAutoEnrollmentPowerLimit,
- Value::CreateIntegerValue(8));
- client_->Start();
- EXPECT_TRUE(client_->should_auto_enroll());
- EXPECT_EQ(1, completion_callback_count_);
- local_state_->SetUserPref(prefs::kShouldAutoEnroll,
- Value::CreateBooleanValue(false));
- client_->Start();
- EXPECT_FALSE(client_->should_auto_enroll());
- EXPECT_EQ(2, completion_callback_count_);
-}
-
-TEST_F(AutoEnrollmentClientTest, RetryIfPowerLargerThanCached) {
- local_state_->SetUserPref(prefs::kShouldAutoEnroll,
- Value::CreateBooleanValue(false));
- local_state_->SetUserPref(prefs::kAutoEnrollmentPowerLimit,
- Value::CreateIntegerValue(8));
- CreateClient(kSerial, 5, 10);
- ServerWillReply(-1, true, true);
- client_->Start();
- EXPECT_TRUE(client_->should_auto_enroll());
- EXPECT_EQ(1, completion_callback_count_);
}
} // namespace
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 62000ee..b95d87e 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -82,6 +82,7 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/audio/audio_mixer_alsa.h"
#include "chrome/browser/chromeos/customization_document.h"
+#include "chrome/browser/chromeos/login/base_login_display_host.h"
#include "chrome/browser/chromeos/login/signed_settings_cache.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
@@ -89,7 +90,6 @@
#include "chrome/browser/chromeos/proxy_config_service_impl.h"
#include "chrome/browser/chromeos/status/input_method_menu.h"
#include "chrome/browser/chromeos/status/network_menu_button.h"
-#include "chrome/browser/policy/auto_enrollment_client.h"
#include "chrome/browser/policy/device_status_collector.h"
#else
#include "chrome/browser/extensions/default_apps.h"
@@ -136,13 +136,13 @@ void RegisterLocalState(PrefService* local_state) {
#if defined(OS_CHROMEOS)
chromeos::AudioMixerAlsa::RegisterPrefs(local_state);
chromeos::UserManager::RegisterPrefs(local_state);
+ chromeos::BaseLoginDisplayHost::RegisterPrefs(local_state);
chromeos::WizardController::RegisterPrefs(local_state);
chromeos::InputMethodMenu::RegisterPrefs(local_state);
chromeos::ServicesCustomizationDocument::RegisterPrefs(local_state);
chromeos::signed_settings_cache::RegisterPrefs(local_state);
chromeos::NetworkMenuButton::RegisterPrefs(local_state);
chromeos::ProxyConfigServiceImpl::RegisterPrefs(local_state);
- policy::AutoEnrollmentClient::RegisterPrefs(local_state);
policy::DeviceStatusCollector::RegisterPrefs(local_state);
#endif
}
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index e2e123d..a868577 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -1594,24 +1594,10 @@ const char kHardwareKeyboardLayout[] = "intl.hardware_keyboard";
const char kCarrierDealPromoShown[] =
"settings.internet.mobile.carrier_deal_promo_shown";
-// A boolean pref of the auto-enrollment decision. Its value is only valid if
-// it's not the default value; otherwise, no auto-enrollment decision has been
-// made yet.
+// A boolean pref of the auto-enrollment decision. This pref only exists if the
+// auto-enrollment check has been done once and completed. It can be reset to
+// false if the user opts out of auto enrollment.
const char kShouldAutoEnroll[] = "ShouldAutoEnroll";
-
-// An integer pref with the maximum number of bits used by the client in a
-// previous auto-enrollment request. If the client goes through an auto update
-// during OOBE and reboots into a version of the OS with a larger maximum
-// modulus, then it will retry auto-enrollment using the updated value.
-const char kAutoEnrollmentPowerLimit[] = "AutoEnrollmentPowerLimit";
-
-// A boolean pref that indicates whether OS & firmware version info should be
-// reported along with device policy requests.
-const char kReportDeviceVersionInfo[] = "device_status.report_version_info";
-
-// A boolean pref that indicates whether device activity times should be
-// recorded and reported along with device policy requests.
-const char kReportDeviceActivityTimes[] = "device_status.report_activity_times";
#endif
// Whether there is a Flash version installed that supports clearing LSO data.
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index 410dc29..1d0be21 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -615,9 +615,6 @@ extern const char kSignedSettingsCache[];
extern const char kHardwareKeyboardLayout[];
extern const char kCarrierDealPromoShown[];
extern const char kShouldAutoEnroll[];
-extern const char kAutoEnrollmentPowerLimit[];
-extern const char kReportDeviceVersionInfo[];
-extern const char kReportDeviceActivityTimes[];
#endif
extern const char kClearPluginLSODataEnabled[];