OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/files/file_path_watcher_kqueue.h" | 5 #include "base/files/file_path_watcher_kqueue.h" |
6 | 6 |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <sys/param.h> | 9 #include <sys/param.h> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "base/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 | 16 |
17 // On some platforms these are not defined. | 17 // On some platforms these are not defined. |
18 #if !defined(EV_RECEIPT) | 18 #if !defined(EV_RECEIPT) |
19 #define EV_RECEIPT 0 | 19 #define EV_RECEIPT 0 |
20 #endif | 20 #endif |
21 #if !defined(O_EVTONLY) | 21 #if !defined(O_EVTONLY) |
22 #define O_EVTONLY O_RDONLY | 22 #define O_EVTONLY O_RDONLY |
23 #endif | 23 #endif |
24 | 24 |
25 namespace base { | 25 namespace base { |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 kqueue_ = -1; | 382 kqueue_ = -1; |
383 std::for_each(events_.begin(), events_.end(), ReleaseEvent); | 383 std::for_each(events_.begin(), events_.end(), ReleaseEvent); |
384 events_.clear(); | 384 events_.clear(); |
385 io_task_runner_ = NULL; | 385 io_task_runner_ = NULL; |
386 MessageLoop::current()->RemoveDestructionObserver(this); | 386 MessageLoop::current()->RemoveDestructionObserver(this); |
387 callback_.Reset(); | 387 callback_.Reset(); |
388 } | 388 } |
389 } | 389 } |
390 | 390 |
391 } // namespace base | 391 } // namespace base |
OLD | NEW |