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

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: Address nits, 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 867488a2bb2f11f7bc671ae32904bfe7f50910f2..3df88cf9a810569a202f3c00358380859d45198c 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h
@@ -12,6 +12,7 @@
#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"
@@ -46,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
@@ -124,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_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698