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 <sys/param.h> | 8 #include <sys/param.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
14 | 14 |
15 // On some platforms these are not defined. | 15 // On some platforms these are not defined. |
16 #if !defined(EV_RECEIPT) | 16 #if !defined(EV_RECEIPT) |
17 #define EV_RECEIPT 0 | 17 #define EV_RECEIPT 0 |
18 #endif | 18 #endif |
19 #if !defined(O_EVTONLY) | 19 #if !defined(O_EVTONLY) |
20 #define O_EVTONLY O_RDONLY | 20 #define O_EVTONLY O_RDONLY |
21 #endif | 21 #endif |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 kqueue_ = -1; | 380 kqueue_ = -1; |
381 std::for_each(events_.begin(), events_.end(), ReleaseEvent); | 381 std::for_each(events_.begin(), events_.end(), ReleaseEvent); |
382 events_.clear(); | 382 events_.clear(); |
383 io_message_loop_ = NULL; | 383 io_message_loop_ = NULL; |
384 MessageLoop::current()->RemoveDestructionObserver(this); | 384 MessageLoop::current()->RemoveDestructionObserver(this); |
385 callback_.Reset(); | 385 callback_.Reset(); |
386 } | 386 } |
387 } | 387 } |
388 | 388 |
389 } // namespace base | 389 } // namespace base |
OLD | NEW |