| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "chrome/browser/devtools/devtools_file_watcher.h" | 5 #include "chrome/browser/devtools/devtools_file_watcher.h" |
| 6 | 6 |
| 7 #include <algorithm> |
| 7 #include <map> | 8 #include <map> |
| 8 #include <set> | 9 #include <set> |
| 9 | 10 |
| 10 #include "base/bind.h" | 11 #include "base/bind.h" |
| 11 #include "base/files/file_enumerator.h" | 12 #include "base/files/file_enumerator.h" |
| 12 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 13 #include "base/files/file_path_watcher.h" | 14 #include "base/files/file_path_watcher.h" |
| 14 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 15 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 16 | 17 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 172 |
| 172 void DevToolsFileWatcher::AddWatch(const base::FilePath& path) { | 173 void DevToolsFileWatcher::AddWatch(const base::FilePath& path) { |
| 173 DCHECK_CURRENTLY_ON(BrowserThread::FILE); | 174 DCHECK_CURRENTLY_ON(BrowserThread::FILE); |
| 174 shared_watcher_->AddWatch(path); | 175 shared_watcher_->AddWatch(path); |
| 175 } | 176 } |
| 176 | 177 |
| 177 void DevToolsFileWatcher::RemoveWatch(const base::FilePath& path) { | 178 void DevToolsFileWatcher::RemoveWatch(const base::FilePath& path) { |
| 178 DCHECK_CURRENTLY_ON(BrowserThread::FILE); | 179 DCHECK_CURRENTLY_ON(BrowserThread::FILE); |
| 179 shared_watcher_->RemoveWatch(path); | 180 shared_watcher_->RemoveWatch(path); |
| 180 } | 181 } |
| OLD | NEW |