summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authordmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-01 00:49:38 +0000
committerdmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-01 00:49:38 +0000
commit59eee29eaf8956a182fa2e326eb3082ed69e933d (patch)
treeab88423b0f59d5d53b375413da952e1865b8a9e7 /chrome
parent4ecaffee18df3cd4190459b0eed3d0d0187abadf (diff)
downloadchromium_src-59eee29eaf8956a182fa2e326eb3082ed69e933d.zip
chromium_src-59eee29eaf8956a182fa2e326eb3082ed69e933d.tar.gz
chromium_src-59eee29eaf8956a182fa2e326eb3082ed69e933d.tar.bz2
Revert 80101 - kqueue implementation of FilePathWatcher on Mac.
BUG=54822,77391,77217,77064,69641 TEST=BUILD Review URL: http://codereview.chromium.org/6731064 TBR=dmaclach@chromium.org Review URL: http://codereview.chromium.org/6689004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80113 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/policy/file_based_policy_loader.cc3
-rw-r--r--chrome/browser/user_style_sheet_watcher.cc3
-rw-r--r--chrome/common/service_process_util_mac.mm5
-rw-r--r--chrome/common/service_process_util_posix.h2
4 files changed, 10 insertions, 3 deletions
diff --git a/chrome/browser/policy/file_based_policy_loader.cc b/chrome/browser/policy/file_based_policy_loader.cc
index 62114fa..c12bbcf 100644
--- a/chrome/browser/policy/file_based_policy_loader.cc
+++ b/chrome/browser/policy/file_based_policy_loader.cc
@@ -97,7 +97,8 @@ void FileBasedPolicyLoader::InitOnFileThread() {
if (!config_file_path().empty() &&
!watcher_->Watch(
config_file_path(),
- new FileBasedPolicyWatcherDelegate(this))) {
+ new FileBasedPolicyWatcherDelegate(this),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI))) {
OnError();
}
diff --git a/chrome/browser/user_style_sheet_watcher.cc b/chrome/browser/user_style_sheet_watcher.cc
index 516501d..9a314b3 100644
--- a/chrome/browser/user_style_sheet_watcher.cc
+++ b/chrome/browser/user_style_sheet_watcher.cc
@@ -150,7 +150,8 @@ void UserStyleSheetWatcher::Init() {
.AppendASCII(kUserStyleSheetFile);
if (!file_watcher_->Watch(
style_sheet_file,
- loader_.get())) {
+ loader_.get(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI))) {
LOG(ERROR) << "Failed to setup watch for " << style_sheet_file.value();
}
loader_->LoadStyleSheet(style_sheet_file);
diff --git a/chrome/common/service_process_util_mac.mm b/chrome/common/service_process_util_mac.mm
index 62a0371..d06a93e 100644
--- a/chrome/common/service_process_util_mac.mm
+++ b/chrome/common/service_process_util_mac.mm
@@ -179,6 +179,7 @@ bool ServiceProcessState::Initialize() {
return false;
}
state_->launchd_conf_.reset(dict);
+ state_->ui_message_loop_= base::MessageLoopProxy::CreateForCurrentThread();
return true;
}
@@ -322,7 +323,9 @@ bool ServiceProcessState::StateData::WatchExecutable() {
LOG(ERROR) << "executable_watcher_.Init " << executable_path.value();
return false;
}
- if (!executable_watcher_.Watch(executable_path, delegate.release())) {
+ if (!executable_watcher_.Watch(executable_path,
+ delegate.release(),
+ ui_message_loop_)) {
LOG(ERROR) << "executable_watcher_.watch " << executable_path.value();
return false;
}
diff --git a/chrome/common/service_process_util_posix.h b/chrome/common/service_process_util_posix.h
index b0a908b..9928917 100644
--- a/chrome/common/service_process_util_posix.h
+++ b/chrome/common/service_process_util_posix.h
@@ -21,6 +21,7 @@ MultiProcessLock* TakeServiceRunningLock(bool waiting);
#if defined(OS_MACOSX)
#include "base/mac/scoped_cftyperef.h"
+#include "base/message_loop_proxy.h"
#include "content/common/file_path_watcher/file_path_watcher.h"
class CommandLine;
@@ -67,6 +68,7 @@ struct ServiceProcessState::StateData
base::mac::ScopedCFTypeRef<CFDictionaryRef> launchd_conf_;
FilePathWatcher executable_watcher_;
+ scoped_refptr<base::MessageLoopProxy> ui_message_loop_;
#endif // OS_MACOSX
#if defined(OS_LINUX)
scoped_ptr<MultiProcessLock> initializing_lock_;