OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/file_manager/file_watcher.h" | 5 #include "chrome/browser/chromeos/file_manager/file_watcher.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
9 #include "chrome/browser/google_apis/task_util.h" | |
10 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
| 10 #include "google_apis/drive/task_util.h" |
11 | 11 |
12 using content::BrowserThread; | 12 using content::BrowserThread; |
13 | 13 |
14 namespace file_manager { | 14 namespace file_manager { |
15 namespace { | 15 namespace { |
16 | 16 |
17 // Creates a base::FilePathWatcher and starts watching at |watch_path| with | 17 // Creates a base::FilePathWatcher and starts watching at |watch_path| with |
18 // |callback|. Returns NULL on failure. | 18 // |callback|. Returns NULL on failure. |
19 base::FilePathWatcher* CreateAndStartFilePathWatcher( | 19 base::FilePathWatcher* CreateAndStartFilePathWatcher( |
20 const base::FilePath& watch_path, | 20 const base::FilePath& watch_path, |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 if (file_watcher) { | 108 if (file_watcher) { |
109 local_file_watcher_ = file_watcher; | 109 local_file_watcher_ = file_watcher; |
110 callback.Run(true); | 110 callback.Run(true); |
111 } else { | 111 } else { |
112 callback.Run(false); | 112 callback.Run(false); |
113 } | 113 } |
114 } | 114 } |
115 | 115 |
116 } // namespace file_manager | 116 } // namespace file_manager |
OLD | NEW |