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

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

Issue 23450022: Put a hard limit on initial policy fetch wait time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 3 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/policy/user_cloud_policy_manager_chromeos.h
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h
index b5c6623d16a1012d32d900ee02ef1f31da855dbe..f1bee8ce78cc1c4881d524a5c7f5a7f6fb6b4516 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h
@@ -11,6 +11,8 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/time/time.h"
+#include "base/timer/timer.h"
#include "chrome/browser/policy/cloud/cloud_policy_client.h"
#include "chrome/browser/policy/cloud/cloud_policy_constants.h"
#include "chrome/browser/policy/cloud/cloud_policy_manager.h"
@@ -45,7 +47,8 @@ class UserCloudPolicyManagerChromeOS
UserCloudPolicyManagerChromeOS(
scoped_ptr<CloudPolicyStore> store,
scoped_ptr<ResourceCache> resource_cache,
- bool wait_for_policy_fetch);
+ bool wait_for_policy_fetch,
+ base::TimeDelta initial_policy_fetch_timeout);
virtual ~UserCloudPolicyManagerChromeOS();
// Initializes the cloud connection. |local_state| and
@@ -123,6 +126,10 @@ class UserCloudPolicyManagerChromeOS
// IsInitializationComplete().
bool wait_for_policy_fetch_;
+ // A timer that puts a hard limit on the maximum time to wait for the intial
+ // policy fetch.
+ base::Timer policy_fetch_timeout_;
+
// The pref service to pass to the refresh scheduler on initialization.
PrefService* local_state_;

Powered by Google App Engine
This is Rietveld 408576698