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

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

Issue 1446363003: Deleted OS_WIN and all Windows specific files from base. (Closed) Base URL: https://github.com/domokit/mojo.git@base_tests
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « base/files/file_path_unittest.cc ('k') | base/files/file_path_watcher_unittest.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 // Cross platform methods for FilePathWatcher. See the various platform 5 // Cross platform methods for FilePathWatcher. See the various platform
6 // specific implementation files, too. 6 // specific implementation files, too.
7 7
8 #include "base/files/file_path_watcher.h" 8 #include "base/files/file_path_watcher.h"
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 14 matching lines...) Expand all
25 const scoped_refptr<PlatformDelegate>& delegate) { 25 const scoped_refptr<PlatformDelegate>& delegate) {
26 delegate->CancelOnMessageLoopThread(); 26 delegate->CancelOnMessageLoopThread();
27 } 27 }
28 28
29 // static 29 // static
30 bool FilePathWatcher::RecursiveWatchAvailable() { 30 bool FilePathWatcher::RecursiveWatchAvailable() {
31 #if defined(OS_MACOSX) && !defined(OS_IOS) 31 #if defined(OS_MACOSX) && !defined(OS_IOS)
32 // FSEvents isn't available on iOS and is broken on OSX 10.6 and earlier. 32 // FSEvents isn't available on iOS and is broken on OSX 10.6 and earlier.
33 // See http://crbug.com/54822#c31 33 // See http://crbug.com/54822#c31
34 return mac::IsOSLionOrLater(); 34 return mac::IsOSLionOrLater();
35 #elif defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID) 35 #elif defined(OS_LINUX) || defined(OS_ANDROID)
36 return true; 36 return true;
37 #else 37 #else
38 return false; 38 return false;
39 #endif 39 #endif
40 } 40 }
41 41
42 FilePathWatcher::PlatformDelegate::PlatformDelegate(): cancelled_(false) { 42 FilePathWatcher::PlatformDelegate::PlatformDelegate(): cancelled_(false) {
43 } 43 }
44 44
45 FilePathWatcher::PlatformDelegate::~PlatformDelegate() { 45 FilePathWatcher::PlatformDelegate::~PlatformDelegate() {
46 DCHECK(is_cancelled()); 46 DCHECK(is_cancelled());
47 } 47 }
48 48
49 bool FilePathWatcher::Watch(const FilePath& path, 49 bool FilePathWatcher::Watch(const FilePath& path,
50 bool recursive, 50 bool recursive,
51 const Callback& callback) { 51 const Callback& callback) {
52 DCHECK(path.IsAbsolute()); 52 DCHECK(path.IsAbsolute());
53 return impl_->Watch(path, recursive, callback); 53 return impl_->Watch(path, recursive, callback);
54 } 54 }
55 55
56 } // namespace base 56 } // namespace base
OLDNEW
« no previous file with comments | « base/files/file_path_unittest.cc ('k') | base/files/file_path_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698