Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(884)

Unified Diff: chrome/browser/extensions/user_script_master.cc

Issue 115229: Add support for almost-recursive watches in Linux DirectoryWatcher (Closed)
Patch Set: fix NULL file_thread scenario Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/file_util_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
}
« no previous file with comments | « base/file_util_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698