diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-18 04:11:49 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-18 04:11:49 +0000 |
commit | b8ca91f78cf0ba682787ec1c4605021b304f1305 (patch) | |
tree | fa497cdf8396758fc777387c428ad1d9772cb4cd /chrome/browser/policy | |
parent | 0a7031a43ea2b15e606882e9c5e3da58f565b701 (diff) | |
download | chromium_src-b8ca91f78cf0ba682787ec1c4605021b304f1305.zip chromium_src-b8ca91f78cf0ba682787ec1c4605021b304f1305.tar.gz chromium_src-b8ca91f78cf0ba682787ec1c4605021b304f1305.tar.bz2 |
Move FilePathWatcher class from chrome/browser/... to content/common...
The service process needs FilePathWatcher, and with this change I
got rid of the dependency on BrowserThread which allows it to be moved to common/...
I also tried my hand at a kqueue impl on the Mac, but failed.
See http://code.google.com/p/chromium/issues/detail?id=54822#c13 for details.
BUG=74983
TEST=BUILD
Review URL: http://codereview.chromium.org/6670081
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78664 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/policy')
-rw-r--r-- | chrome/browser/policy/file_based_policy_loader.cc | 10 | ||||
-rw-r--r-- | chrome/browser/policy/file_based_policy_loader.h | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/chrome/browser/policy/file_based_policy_loader.cc b/chrome/browser/policy/file_based_policy_loader.cc index cc89d13..c12bbcf 100644 --- a/chrome/browser/policy/file_based_policy_loader.cc +++ b/chrome/browser/policy/file_based_policy_loader.cc @@ -1,9 +1,11 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/policy/file_based_policy_loader.h" +#include "content/browser/browser_thread.h" + namespace { // Amount of time we wait for the files on disk to settle before trying to load @@ -93,8 +95,10 @@ void FileBasedPolicyLoader::InitOnFileThread() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); watcher_.reset(new FilePathWatcher); if (!config_file_path().empty() && - !watcher_->Watch(config_file_path(), - new FileBasedPolicyWatcherDelegate(this))) { + !watcher_->Watch( + config_file_path(), + new FileBasedPolicyWatcherDelegate(this), + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI))) { OnError(); } diff --git a/chrome/browser/policy/file_based_policy_loader.h b/chrome/browser/policy/file_based_policy_loader.h index 97c3198..52aa52b 100644 --- a/chrome/browser/policy/file_based_policy_loader.h +++ b/chrome/browser/policy/file_based_policy_loader.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,9 +6,9 @@ #define CHROME_BROWSER_POLICY_FILE_BASED_POLICY_LOADER_H_ #pragma once -#include "chrome/browser/file_path_watcher/file_path_watcher.h" #include "chrome/browser/policy/asynchronous_policy_loader.h" #include "chrome/browser/policy/file_based_policy_provider.h" +#include "content/common/file_path_watcher/file_path_watcher.h" namespace policy { |