Chromium Code Reviews| 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 // This file exists for Unix systems which don't have the inotify headers, and | 5 // This file exists for Unix systems which don't have the inotify headers, and |
| 6 // thus cannot build file_watcher_inotify.cc | 6 // thus cannot build file_watcher_inotify.cc |
| 7 | 7 |
| 8 #include "base/files/file_path_watcher.h" | 8 #include "base/files/file_path_watcher.h" |
| 9 | 9 |
| 10 #include "base/macros.h" | |
| 11 #include "base/memory/ptr_util.h" | |
| 12 | |
| 10 namespace base { | 13 namespace base { |
| 11 | 14 |
| 12 namespace { | 15 namespace { |
| 13 | 16 |
| 14 class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate { | 17 class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate { |
| 15 public: | 18 public: |
| 19 ~FilePathWatcherImpl() override = default; | |
| 20 | |
| 16 bool Watch(const FilePath& path, | 21 bool Watch(const FilePath& path, |
| 17 bool recursive, | 22 bool recursive, |
| 18 const FilePathWatcher::Callback& callback) override { | 23 const FilePathWatcher::Callback& callback) override { |
| 19 return false; | 24 return false; |
| 20 } | 25 } |
| 21 | 26 |
| 22 void Cancel() override {} | 27 void Cancel() override {} |
| 23 | 28 |
| 24 protected: | 29 private: |
| 25 ~FilePathWatcherImpl() override {} | 30 DISALLOW_COPY_AND_ASSIGN(FilePathWatcherImpl); |
|
gab
2017/01/05 21:22:53
Probably need an explicit public default construct
fdoray
2017/01/05 23:04:11
Done.
| |
| 26 }; | 31 }; |
| 27 | 32 |
| 28 } // namespace | 33 } // namespace |
| 29 | 34 |
| 30 FilePathWatcher::FilePathWatcher() { | 35 FilePathWatcher::FilePathWatcher() { |
| 31 sequence_checker_.DetachFromSequence(); | 36 sequence_checker_.DetachFromSequence(); |
| 32 impl_ = new FilePathWatcherImpl(); | 37 impl_ = MakeUnique<FilePathWatcherImpl>(); |
| 33 } | 38 } |
| 34 | 39 |
| 35 } // namespace base | 40 } // namespace base |
| OLD | NEW |