Index: chrome/browser/extensions/user_script_master.cc |
diff --git a/chrome/browser/extensions/user_script_master.cc b/chrome/browser/extensions/user_script_master.cc |
index bcacf671ffb5fd81c9337a06da62769a051eb661..8b5e4d9d3a59b843a60386596704d42b3cdbd2a8 100644 |
--- a/chrome/browser/extensions/user_script_master.cc |
+++ b/chrome/browser/extensions/user_script_master.cc |
@@ -12,6 +12,8 @@ |
#include "base/pickle.h" |
#include "base/stl_util-inl.h" |
#include "base/string_util.h" |
+#include "base/thread.h" |
+#include "chrome/browser/browser_process.h" |
#include "chrome/common/notification_service.h" |
#include "chrome/common/url_constants.h" |
#include "net/base/net_util.h" |
@@ -271,7 +273,9 @@ void UserScriptMaster::AddWatchedPath(const FilePath& path) { |
// TODO(aa): Enable this when DirectoryWatcher is implemented for linux. |
Evan Martin
2009/05/14 17:48:28
I guess this TODO can be fixed now! Maybe in a di
|
#if defined(OS_WIN) || defined(OS_MACOSX) |
DirectoryWatcher* watcher = new DirectoryWatcher(); |
- watcher->Watch(path, this, true); |
+ base::Thread* file_thread = g_browser_process->file_thread(); |
+ watcher->Watch(path, this, file_thread ? file_thread->message_loop() : NULL, |
+ true); |
dir_watchers_.push_back(watcher); |
#endif |
} |