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 "components/drive/file_write_watcher.h" | 5 #include "components/drive/file_write_watcher.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/files/file_path_watcher.h" | 15 #include "base/files/file_path_watcher.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/memory/ptr_util.h" | 17 #include "base/memory/ptr_util.h" |
| 18 #include "base/memory/ref_counted.h" |
| 19 #include "base/single_thread_task_runner.h" |
18 #include "base/timer/timer.h" | 20 #include "base/timer/timer.h" |
19 #include "google_apis/drive/task_util.h" | 21 #include "google_apis/drive/task_util.h" |
20 | 22 |
21 namespace drive { | 23 namespace drive { |
22 namespace internal { | 24 namespace internal { |
23 | 25 |
24 namespace { | 26 namespace { |
25 const int64_t kWriteEventDelayInSeconds = 5; | 27 const int64_t kWriteEventDelayInSeconds = 5; |
26 } // namespace | 28 } // namespace |
27 | 29 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 DCHECK(thread_checker_.CalledOnValidThread()); | 202 DCHECK(thread_checker_.CalledOnValidThread()); |
201 watcher_impl_->StartWatch(file_path, on_start_callback, on_write_callback); | 203 watcher_impl_->StartWatch(file_path, on_start_callback, on_write_callback); |
202 } | 204 } |
203 | 205 |
204 void FileWriteWatcher::DisableDelayForTesting() { | 206 void FileWriteWatcher::DisableDelayForTesting() { |
205 watcher_impl_->set_delay(base::TimeDelta()); | 207 watcher_impl_->set_delay(base::TimeDelta()); |
206 } | 208 } |
207 | 209 |
208 } // namespace internal | 210 } // namespace internal |
209 } // namespace drive | 211 } // namespace drive |
OLD | NEW |