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

Unified Diff: chrome/browser/chromeos/settings/device_settings_test_helper.cc

Issue 2890433002: Revert "Abandon user sign in when policy is retrieved before session started." (Closed)
Patch Set: Created 3 years, 7 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
Index: chrome/browser/chromeos/settings/device_settings_test_helper.cc
diff --git a/chrome/browser/chromeos/settings/device_settings_test_helper.cc b/chrome/browser/chromeos/settings/device_settings_test_helper.cc
index 4ef1ae9d5086a4de8c2225fe39a469b02abc0b7c..5084eff322736a50cfb7fda8cb88f5ae459c6f25 100644
--- a/chrome/browser/chromeos/settings/device_settings_test_helper.cc
+++ b/chrome/browser/chromeos/settings/device_settings_test_helper.cc
@@ -20,9 +20,6 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/test/test_utils.h"
-using RetrievePolicyResponseType =
- chromeos::DeviceSettingsTestHelper::RetrievePolicyResponseType;
-
namespace chromeos {
DeviceSettingsTestHelper::DeviceSettingsTestHelper() {}
@@ -54,7 +51,7 @@ void DeviceSettingsTestHelper::FlushRetrieve() {
callbacks.swap(device_policy_.retrieve_callbacks_);
for (std::vector<RetrievePolicyCallback>::iterator cb(callbacks.begin());
cb != callbacks.end(); ++cb) {
- cb->Run(device_policy_.policy_blob_, RetrievePolicyResponseType::SUCCESS);
+ cb->Run(device_policy_.policy_blob_);
}
std::map<std::string, PolicyState>::iterator device_local_account_state;
@@ -65,8 +62,7 @@ void DeviceSettingsTestHelper::FlushRetrieve() {
callbacks.swap(device_local_account_state->second.retrieve_callbacks_);
for (std::vector<RetrievePolicyCallback>::iterator cb(callbacks.begin());
cb != callbacks.end(); ++cb) {
- cb->Run(device_local_account_state->second.policy_blob_,
- RetrievePolicyResponseType::SUCCESS);
+ cb->Run(device_local_account_state->second.policy_blob_);
}
}
}
@@ -101,11 +97,8 @@ void DeviceSettingsTestHelper::RetrieveDevicePolicy(
device_policy_.retrieve_callbacks_.push_back(callback);
}
-RetrievePolicyResponseType
-DeviceSettingsTestHelper::BlockingRetrieveDevicePolicy(
- std::string* policy_out) {
- *policy_out = device_policy_.policy_blob_;
- return RetrievePolicyResponseType::SUCCESS;
+std::string DeviceSettingsTestHelper::BlockingRetrieveDevicePolicy() {
+ return device_policy_.policy_blob_;
}
void DeviceSettingsTestHelper::RetrieveDeviceLocalAccountPolicy(
@@ -115,12 +108,9 @@ void DeviceSettingsTestHelper::RetrieveDeviceLocalAccountPolicy(
callback);
}
-RetrievePolicyResponseType
-DeviceSettingsTestHelper::BlockingRetrieveDeviceLocalAccountPolicy(
- const std::string& account_id,
- std::string* policy_out) {
- *policy_out = "";
- return RetrievePolicyResponseType::SUCCESS;
+std::string DeviceSettingsTestHelper::BlockingRetrieveDeviceLocalAccountPolicy(
+ const std::string& account_id) {
+ return "";
}
void DeviceSettingsTestHelper::StoreDevicePolicy(

Powered by Google App Engine
This is Rietveld 408576698