summaryrefslogtreecommitdiffstats
path: root/chrome/browser/user_style_sheet_watcher.cc
diff options
context:
space:
mode:
authordmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-18 04:11:49 +0000
committerdmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-18 04:11:49 +0000
commitb8ca91f78cf0ba682787ec1c4605021b304f1305 (patch)
treefa497cdf8396758fc777387c428ad1d9772cb4cd /chrome/browser/user_style_sheet_watcher.cc
parent0a7031a43ea2b15e606882e9c5e3da58f565b701 (diff)
downloadchromium_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/user_style_sheet_watcher.cc')
-rw-r--r--chrome/browser/user_style_sheet_watcher.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/user_style_sheet_watcher.cc b/chrome/browser/user_style_sheet_watcher.cc
index 347462c..9a314b3 100644
--- a/chrome/browser/user_style_sheet_watcher.cc
+++ b/chrome/browser/user_style_sheet_watcher.cc
@@ -148,8 +148,12 @@ void UserStyleSheetWatcher::Init() {
file_watcher_.reset(new FilePathWatcher);
FilePath style_sheet_file = profile_path_.AppendASCII(kStyleSheetDir)
.AppendASCII(kUserStyleSheetFile);
- if (!file_watcher_->Watch(style_sheet_file, loader_.get()))
+ if (!file_watcher_->Watch(
+ style_sheet_file,
+ loader_.get(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI))) {
LOG(ERROR) << "Failed to setup watch for " << style_sheet_file.value();
+ }
loader_->LoadStyleSheet(style_sheet_file);
}
}