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

Unified Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc

Issue 2534983002: Re-enabled UserCloudPolicyManagerChromeOS unit tests (Closed)
Patch Set: Created 4 years, 1 month 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/policy/user_cloud_policy_manager_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
index df022e079ba55af148393bb888d37c1922c71e2e..cdf3bf4eb37a1c57d468bd544fbb812cda7fda92 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
@@ -118,6 +118,12 @@ UserCloudPolicyManagerChromeOS::UserCloudPolicyManagerChromeOS(
}
}
+void UserCloudPolicyManagerChromeOS::ForceTimeoutForTest() {
+ DCHECK(policy_fetch_timeout_.IsRunning());
+ policy_fetch_timeout_.Stop();
pmarko 2016/11/29 14:03:34 nit: I think stopping the timer would not be stric
Andrew T Wilson (Slow) 2016/11/30 10:02:34 Agreed, but I'm trying to mimic the behavior of a
+ this->OnBlockingFetchTimeout();
emaxx 2016/11/29 16:21:15 nit: Is "this->" really needed here?
Andrew T Wilson (Slow) 2016/11/30 10:02:34 No, you are just seeing the artifacts of a rusty m
+}
+
UserCloudPolicyManagerChromeOS::~UserCloudPolicyManagerChromeOS() {}
void UserCloudPolicyManagerChromeOS::Connect(
@@ -303,6 +309,7 @@ void UserCloudPolicyManagerChromeOS::OnStoreLoaded(
em::PolicyData const* const policy_data = cloud_policy_store->policy();
if (policy_data) {
+ DCHECK(policy_data->has_username());
chromeos::AffiliationIDSet set_of_user_affiliation_ids(
policy_data->user_affiliation_ids().begin(),
policy_data->user_affiliation_ids().end());

Powered by Google App Engine
This is Rietveld 408576698