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

Unified Diff: chrome/browser/policy/file_based_policy_loader.cc

Issue 5732002: Fix policy refresh. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: check diffs Created 10 years 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 | « chrome/browser/policy/file_based_policy_loader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/file_based_policy_loader.cc
diff --git a/chrome/browser/policy/file_based_policy_loader.cc b/chrome/browser/policy/file_based_policy_loader.cc
index 947008b3ffdd332c441954b471f5335c93e5c4a9..5d49f989edae0b54c32855cdeed63cb1ae195b21 100644
--- a/chrome/browser/policy/file_based_policy_loader.cc
+++ b/chrome/browser/policy/file_based_policy_loader.cc
@@ -58,7 +58,7 @@ void FileBasedPolicyLoader::Init() {
// the task to be forgotten. Instead, post a task to the ui thread to delay
// the remainder of initialization until threading is fully initialized.
BrowserThread::PostTask(
- BrowserThread::FILE, FROM_HERE,
+ BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&FileBasedPolicyLoader::InitAfterFileThreadAvailable));
}
@@ -115,13 +115,11 @@ void FileBasedPolicyLoader::InitAfterFileThreadAvailable() {
if (provider()) {
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
- NewRunnableMethod(this, &FileBasedPolicyLoader::InitWatcher));
-
- ScheduleFallbackReloadTask();
+ NewRunnableMethod(this, &FileBasedPolicyLoader::InitOnFileThread));
}
}
-void FileBasedPolicyLoader::InitWatcher() {
+void FileBasedPolicyLoader::InitOnFileThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
watcher_.reset(new FilePathWatcher);
if (!config_file_path().empty() &&
@@ -134,6 +132,8 @@ void FileBasedPolicyLoader::InitWatcher() {
// construction of the loader and initialization of the watcher. Call reload
// to detect if that is the case.
Reload();
+
+ ScheduleFallbackReloadTask();
}
void FileBasedPolicyLoader::StopOnFileThread() {
« no previous file with comments | « chrome/browser/policy/file_based_policy_loader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698