OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/log/file_net_log_observer.h" | 5 #include "net/log/file_net_log_observer.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <memory> | 8 #include <memory> |
9 #include <queue> | 9 #include <queue> |
10 #include <set> | 10 #include <set> |
11 #include <string> | 11 #include <string> |
12 #include <utility> | 12 #include <utility> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/files/file_util.h" | 16 #include "base/files/file_util.h" |
17 #include "base/json/json_writer.h" | 17 #include "base/json/json_writer.h" |
18 #include "base/logging.h" | 18 #include "base/logging.h" |
| 19 #include "base/single_thread_task_runner.h" |
19 #include "base/strings/string_number_conversions.h" | 20 #include "base/strings/string_number_conversions.h" |
20 #include "base/synchronization/lock.h" | 21 #include "base/synchronization/lock.h" |
21 #include "base/threading/thread.h" | 22 #include "base/threading/thread.h" |
22 #include "base/values.h" | 23 #include "base/values.h" |
23 #include "net/log/net_log_capture_mode.h" | 24 #include "net/log/net_log_capture_mode.h" |
24 #include "net/log/net_log_entry.h" | 25 #include "net/log/net_log_entry.h" |
25 #include "net/log/net_log_util.h" | 26 #include "net/log/net_log_util.h" |
26 #include "net/url_request/url_request_context.h" | 27 #include "net/url_request/url_request_context.h" |
27 | 28 |
28 namespace { | 29 namespace { |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 void FileNetLogObserver::UnboundedFileWriter::DeleteAllFiles() { | 530 void FileNetLogObserver::UnboundedFileWriter::DeleteAllFiles() { |
530 DCHECK(task_runner_->RunsTasksOnCurrentThread()); | 531 DCHECK(task_runner_->RunsTasksOnCurrentThread()); |
531 | 532 |
532 // Reset |file_| to release the file handle so base::DeleteFile can | 533 // Reset |file_| to release the file handle so base::DeleteFile can |
533 // safely access it. | 534 // safely access it. |
534 file_.reset(); | 535 file_.reset(); |
535 base::DeleteFile(file_path_, false); | 536 base::DeleteFile(file_path_, false); |
536 } | 537 } |
537 | 538 |
538 } // namespace net | 539 } // namespace net |
OLD | NEW |