| 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 #include "net/dns/watching_file_reader.h" | 5 #include "net/dns/watching_file_reader.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" |
| 8 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
| 9 #include "base/threading/worker_pool.h" | 10 #include "base/threading/worker_pool.h" |
| 10 | 11 |
| 11 namespace net { | 12 namespace net { |
| 12 | 13 |
| 13 FilePathWatcherShim::FilePathWatcherShim() | 14 FilePathWatcherShim::FilePathWatcherShim() |
| 14 : watcher_(new base::files::FilePathWatcher()) {} | 15 : watcher_(new base::files::FilePathWatcher()) {} |
| 15 FilePathWatcherShim::~FilePathWatcherShim() {} | 16 FilePathWatcherShim::~FilePathWatcherShim() {} |
| 16 | 17 |
| 17 bool FilePathWatcherShim::Watch( | 18 bool FilePathWatcherShim::Watch( |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 reading_ = false; | 124 reading_ = false; |
| 124 if (read_pending_) { | 125 if (read_pending_) { |
| 125 // Discard this result and re-read. | 126 // Discard this result and re-read. |
| 126 ReadNow(); | 127 ReadNow(); |
| 127 return; | 128 return; |
| 128 } | 129 } |
| 129 this->OnReadFinished(); | 130 this->OnReadFinished(); |
| 130 } | 131 } |
| 131 | 132 |
| 132 } // namespace net | 133 } // namespace net |
| 133 | |
| OLD | NEW |