From 4f96241da28ab67c163fb387299acbaa27fe00f9 Mon Sep 17 00:00:00 2001 From: "dmaclach@chromium.org" Date: Thu, 31 Mar 2011 23:33:33 +0000 Subject: kqueue implementation of FilePathWatcher on Mac. BUG=54822,77391,77217,77064,69641 TEST=BUILD Review URL: http://codereview.chromium.org/6731064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80101 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/policy/file_based_policy_loader.cc | 3 +-- chrome/browser/user_style_sheet_watcher.cc | 3 +-- chrome/common/service_process_util_mac.mm | 5 +---- chrome/common/service_process_util_posix.h | 2 -- 4 files changed, 3 insertions(+), 10 deletions(-) (limited to 'chrome') diff --git a/chrome/browser/policy/file_based_policy_loader.cc b/chrome/browser/policy/file_based_policy_loader.cc index c12bbcf..62114fa 100644 --- a/chrome/browser/policy/file_based_policy_loader.cc +++ b/chrome/browser/policy/file_based_policy_loader.cc @@ -97,8 +97,7 @@ void FileBasedPolicyLoader::InitOnFileThread() { if (!config_file_path().empty() && !watcher_->Watch( config_file_path(), - new FileBasedPolicyWatcherDelegate(this), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI))) { + new FileBasedPolicyWatcherDelegate(this))) { OnError(); } diff --git a/chrome/browser/user_style_sheet_watcher.cc b/chrome/browser/user_style_sheet_watcher.cc index 9a314b3..516501d 100644 --- a/chrome/browser/user_style_sheet_watcher.cc +++ b/chrome/browser/user_style_sheet_watcher.cc @@ -150,8 +150,7 @@ void UserStyleSheetWatcher::Init() { .AppendASCII(kUserStyleSheetFile); if (!file_watcher_->Watch( style_sheet_file, - loader_.get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI))) { + loader_.get())) { 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 d06a93e..62a0371 100644 --- a/chrome/common/service_process_util_mac.mm +++ b/chrome/common/service_process_util_mac.mm @@ -179,7 +179,6 @@ bool ServiceProcessState::Initialize() { return false; } state_->launchd_conf_.reset(dict); - state_->ui_message_loop_= base::MessageLoopProxy::CreateForCurrentThread(); return true; } @@ -323,9 +322,7 @@ bool ServiceProcessState::StateData::WatchExecutable() { LOG(ERROR) << "executable_watcher_.Init " << executable_path.value(); return false; } - if (!executable_watcher_.Watch(executable_path, - delegate.release(), - ui_message_loop_)) { + if (!executable_watcher_.Watch(executable_path, delegate.release())) { 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 9928917..b0a908b 100644 --- a/chrome/common/service_process_util_posix.h +++ b/chrome/common/service_process_util_posix.h @@ -21,7 +21,6 @@ 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; @@ -68,7 +67,6 @@ struct ServiceProcessState::StateData base::mac::ScopedCFTypeRef launchd_conf_; FilePathWatcher executable_watcher_; - scoped_refptr ui_message_loop_; #endif // OS_MACOSX #if defined(OS_LINUX) scoped_ptr initializing_lock_; -- cgit v1.1