| OLD | NEW |
| 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 #ifndef NET_DNS_WATCHING_FILE_READER_H_ | 5 #ifndef NET_DNS_WATCHING_FILE_READER_H_ |
| 6 #define NET_DNS_WATCHING_FILE_READER_H_ | 6 #define NET_DNS_WATCHING_FILE_READER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/files/file_path_watcher.h" | 12 #include "base/files/file_path_watcher.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/threading/non_thread_safe.h" | 15 #include "base/threading/non_thread_safe.h" |
| 16 #include "net/base/net_export.h" | 16 #include "net/base/net_export.h" |
| 17 #include "net/dns/serial_worker.h" | 17 #include "net/dns/serial_worker.h" |
| 18 | 18 |
| 19 // Forward declaration | |
| 20 namespace base { | |
| 21 class MessageLoopProxy; | |
| 22 } | |
| 23 | |
| 24 namespace net { | 19 namespace net { |
| 25 | 20 |
| 26 // Allows mocking FilePathWatcher | 21 // Allows mocking FilePathWatcher |
| 27 class NET_EXPORT_PRIVATE FilePathWatcherShim | 22 class NET_EXPORT_PRIVATE FilePathWatcherShim |
| 28 : NON_EXPORTED_BASE(public base::NonThreadSafe) { | 23 : NON_EXPORTED_BASE(public base::NonThreadSafe) { |
| 29 public: | 24 public: |
| 30 FilePathWatcherShim(); | 25 FilePathWatcherShim(); |
| 31 virtual ~FilePathWatcherShim(); | 26 virtual ~FilePathWatcherShim(); |
| 32 virtual bool Watch( | 27 virtual bool Watch( |
| 33 const FilePath& path, | 28 const FilePath& path, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 scoped_ptr<FilePathWatcherShim> watcher_; | 81 scoped_ptr<FilePathWatcherShim> watcher_; |
| 87 scoped_refptr<WatcherDelegate> watcher_delegate_; | 82 scoped_refptr<WatcherDelegate> watcher_delegate_; |
| 88 scoped_refptr<SerialWorker> reader_; | 83 scoped_refptr<SerialWorker> reader_; |
| 89 | 84 |
| 90 DISALLOW_COPY_AND_ASSIGN(WatchingFileReader); | 85 DISALLOW_COPY_AND_ASSIGN(WatchingFileReader); |
| 91 }; | 86 }; |
| 92 | 87 |
| 93 } // namespace net | 88 } // namespace net |
| 94 | 89 |
| 95 #endif // NET_DNS_WATCHING_FILE_READER_H_ | 90 #endif // NET_DNS_WATCHING_FILE_READER_H_ |
| 96 | |
| OLD | NEW |