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

Side by Side Diff: base/files/file_path_watcher_mac.cc

Issue 6793020: Move FilePathWatcher to base/files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use ::operator<< Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/files/file_path_watcher_linux.cc ('k') | base/files/file_path_watcher_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/common/file_path_watcher/file_path_watcher.h" 5 #include "base/files/file_path_watcher.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <sys/event.h> 8 #include <sys/event.h>
9 #include <sys/param.h> 9 #include <sys/param.h>
10 10
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/file_util.h" 13 #include "base/file_util.h"
14 #include "base/message_loop.h" 14 #include "base/message_loop.h"
15 #include "base/message_loop_proxy.h" 15 #include "base/message_loop_proxy.h"
16 #include "base/stringprintf.h" 16 #include "base/stringprintf.h"
17 17
18 namespace base {
19 namespace files {
20
18 namespace { 21 namespace {
19 22
20 // Mac-specific file watcher implementation based on kqueue. 23 // Mac-specific file watcher implementation based on kqueue.
21 // Originally it was based on FSEvents so that the semantics were equivalent 24 // Originally it was based on FSEvents so that the semantics were equivalent
22 // on Linux, OSX and Windows where it was able to detect: 25 // on Linux, OSX and Windows where it was able to detect:
23 // - file creation/deletion/modification in a watched directory 26 // - file creation/deletion/modification in a watched directory
24 // - file creation/deletion/modification for a watched file 27 // - file creation/deletion/modification for a watched file
25 // - modifications to the paths to a watched object that would affect the 28 // - modifications to the paths to a watched object that would affect the
26 // object such as renaming/attibute changes etc. 29 // object such as renaming/attibute changes etc.
27 // The FSEvents version did all of the above except handling attribute changes 30 // The FSEvents version did all of the above except handling attribute changes
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 MessageLoop::current()->RemoveDestructionObserver(this); 481 MessageLoop::current()->RemoveDestructionObserver(this);
479 delegate_ = NULL; 482 delegate_ = NULL;
480 } 483 }
481 } 484 }
482 485
483 } // namespace 486 } // namespace
484 487
485 FilePathWatcher::FilePathWatcher() { 488 FilePathWatcher::FilePathWatcher() {
486 impl_ = new FilePathWatcherImpl(); 489 impl_ = new FilePathWatcherImpl();
487 } 490 }
491
492 } // namespace files
493 } // namespace base
OLDNEW
« no previous file with comments | « base/files/file_path_watcher_linux.cc ('k') | base/files/file_path_watcher_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698