summaryrefslogtreecommitdiffstats
path: root/chromeos
diff options
context:
space:
mode:
authormnissler <mnissler@chromium.org>2014-10-14 09:10:48 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-14 16:11:07 +0000
commitfe709af454a026e3f6b92773d2e813127991138f (patch)
treeb7c064458a9bc78377b00e2c47bd78bb75c83e48 /chromeos
parentc1e1f74161297a16dc111f016da39a44202a5036 (diff)
downloadchromium_src-fe709af454a026e3f6b92773d2e813127991138f.zip
chromium_src-fe709af454a026e3f6b92773d2e813127991138f.tar.gz
chromium_src-fe709af454a026e3f6b92773d2e813127991138f.tar.bz2
Revert "If booting for the first time skip auto-enrollment check."
This reverts commit 8212232fac77f4f0335ea8d065960777e955d98e. It has been replaced by a simpler implementation, so this code is no longer necessary. BUG=chromium:397354 Review URL: https://codereview.chromium.org/655553002 Cr-Commit-Position: refs/heads/master@{#299490}
Diffstat (limited to 'chromeos')
-rw-r--r--chromeos/dbus/fake_session_manager_client.cc5
-rw-r--r--chromeos/dbus/fake_session_manager_client.h3
-rw-r--r--chromeos/dbus/session_manager_client.cc9
-rw-r--r--chromeos/dbus/session_manager_client.h9
4 files changed, 7 insertions, 19 deletions
diff --git a/chromeos/dbus/fake_session_manager_client.cc b/chromeos/dbus/fake_session_manager_client.cc
index b3aabae..c5fe549 100644
--- a/chromeos/dbus/fake_session_manager_client.cc
+++ b/chromeos/dbus/fake_session_manager_client.cc
@@ -13,8 +13,7 @@
namespace chromeos {
FakeSessionManagerClient::FakeSessionManagerClient()
- : first_boot_(false),
- start_device_wipe_call_count_(0),
+ : start_device_wipe_call_count_(0),
notify_lock_screen_shown_call_count_(0),
notify_lock_screen_dismissed_call_count_(0) {
}
@@ -136,7 +135,7 @@ void FakeSessionManagerClient::SetFlagsForUser(
void FakeSessionManagerClient::GetServerBackedStateKeys(
const StateKeysCallback& callback) {
base::MessageLoop::current()->PostTask(
- FROM_HERE, base::Bind(callback, server_backed_state_keys_, first_boot_));
+ FROM_HERE, base::Bind(callback, server_backed_state_keys_));
}
const std::string& FakeSessionManagerClient::device_policy() const {
diff --git a/chromeos/dbus/fake_session_manager_client.h b/chromeos/dbus/fake_session_manager_client.h
index d0effc6..f69e262 100644
--- a/chromeos/dbus/fake_session_manager_client.h
+++ b/chromeos/dbus/fake_session_manager_client.h
@@ -85,8 +85,6 @@ class FakeSessionManagerClient : public SessionManagerClient {
server_backed_state_keys_ = state_keys;
}
- void set_first_boot(bool first_boot) { first_boot_ = first_boot; }
-
int start_device_wipe_call_count() const {
return start_device_wipe_call_count_;
}
@@ -108,7 +106,6 @@ class FakeSessionManagerClient : public SessionManagerClient {
ObserverList<Observer> observers_;
SessionManagerClient::ActiveSessionsMap user_sessions_;
std::vector<std::string> server_backed_state_keys_;
- bool first_boot_;
int start_device_wipe_call_count_;
int notify_lock_screen_shown_call_count_;
diff --git a/chromeos/dbus/session_manager_client.cc b/chromeos/dbus/session_manager_client.cc
index c74de10..5a67ee8 100644
--- a/chromeos/dbus/session_manager_client.cc
+++ b/chromeos/dbus/session_manager_client.cc
@@ -525,7 +525,6 @@ class SessionManagerClientImpl : public SessionManagerClient {
void OnGetServerBackedStateKeys(const StateKeysCallback& callback,
dbus::Response* response) {
std::vector<std::string> state_keys;
- bool first_run = false;
if (!response) {
LOG(ERROR) << "Failed to call "
<< login_manager::kSessionManagerStartSession;
@@ -548,14 +547,10 @@ class SessionManagerClientImpl : public SessionManagerClient {
std::string(reinterpret_cast<const char*>(data), size));
}
}
- if (!reader.PopBool(&first_run)) {
- // TODO(tnagel): After 2014-11-19 turn this warning into an error.
- LOG(WARNING) << "Chrome OS is too old. Defaulting to first_run=false.";
- }
}
if (!callback.is_null())
- callback.Run(state_keys, first_run);
+ callback.Run(state_keys);
}
@@ -718,7 +713,7 @@ class SessionManagerClientStubImpl : public SessionManagerClient {
state_keys.push_back(crypto::SHA256HashString(base::IntToString(i)));
if (!callback.is_null())
- callback.Run(state_keys, false);
+ callback.Run(state_keys);
}
private:
diff --git a/chromeos/dbus/session_manager_client.h b/chromeos/dbus/session_manager_client.h
index b007bee..d4c0706 100644
--- a/chromeos/dbus/session_manager_client.h
+++ b/chromeos/dbus/session_manager_client.h
@@ -168,16 +168,13 @@ class CHROMEOS_EXPORT SessionManagerClient : public DBusClient {
virtual void SetFlagsForUser(const std::string& username,
const std::vector<std::string>& flags) = 0;
- typedef base::Callback<void(const std::vector<std::string>& state_keys,
- bool first_boot)> StateKeysCallback;
+ typedef base::Callback<void(const std::vector<std::string>& state_keys)>
+ StateKeysCallback;
// Get the currently valid server-backed state keys for the device.
// Server-backed state keys are opaque, device-unique, time-dependent,
// client-determined identifiers that are used for keying state in the cloud
- // for the device to retrieve after a device factory reset. The |first_boot|
- // parameter indicates if this is the very first boot of the device after
- // being assembled (even a "factory reset" will not trigger this again) in
- // which case doing the enrollment check makes no sense.
+ // for the device to retrieve after a device factory reset.
//
// The state keys are returned asynchronously via |callback|. The callback
// will be invoked with an empty state key vector in case of errors.