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