| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 COMPONENTS_NET_LOG_NET_LOG_TEMP_FILE_H_ | 5 #ifndef COMPONENTS_NET_LOG_NET_LOG_TEMP_FILE_H_ |
| 6 #define COMPONENTS_NET_LOG_NET_LOG_TEMP_FILE_H_ | 6 #define COMPONENTS_NET_LOG_NET_LOG_TEMP_FILE_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 11 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 12 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 13 #include "base/macros.h" | 14 #include "base/macros.h" |
| 14 #include "base/memory/scoped_ptr.h" | |
| 15 #include "base/threading/thread_checker.h" | 15 #include "base/threading/thread_checker.h" |
| 16 #include "net/log/net_log.h" | 16 #include "net/log/net_log.h" |
| 17 | 17 |
| 18 namespace base { | 18 namespace base { |
| 19 class DictionaryValue; | 19 class DictionaryValue; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace net { | 22 namespace net { |
| 23 class WriteToFileNetLogObserver; | 23 class WriteToFileNetLogObserver; |
| 24 } | 24 } |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 State state() const { return state_; } | 150 State state() const { return state_; } |
| 151 LogType log_type() const { return log_type_; } | 151 LogType log_type() const { return log_type_; } |
| 152 | 152 |
| 153 State state_; // Current state of NetLogTempFile. | 153 State state_; // Current state of NetLogTempFile. |
| 154 LogType log_type_; // Type of current log file on disk. | 154 LogType log_type_; // Type of current log file on disk. |
| 155 | 155 |
| 156 base::FilePath log_path_; // base::FilePath to the temporary file. | 156 base::FilePath log_path_; // base::FilePath to the temporary file. |
| 157 | 157 |
| 158 // |write_to_file_observer_| watches the NetLog event stream, and | 158 // |write_to_file_observer_| watches the NetLog event stream, and |
| 159 // sends all entries to the file created in StartNetLog(). | 159 // sends all entries to the file created in StartNetLog(). |
| 160 scoped_ptr<net::WriteToFileNetLogObserver> write_to_file_observer_; | 160 std::unique_ptr<net::WriteToFileNetLogObserver> write_to_file_observer_; |
| 161 | 161 |
| 162 // The |chrome_net_log_| is owned by the browser process, cached here to avoid | 162 // The |chrome_net_log_| is owned by the browser process, cached here to avoid |
| 163 // using global (g_browser_process). | 163 // using global (g_browser_process). |
| 164 ChromeNetLog* chrome_net_log_; | 164 ChromeNetLog* chrome_net_log_; |
| 165 | 165 |
| 166 const base::CommandLine::StringType command_line_string_; | 166 const base::CommandLine::StringType command_line_string_; |
| 167 const std::string channel_string_; | 167 const std::string channel_string_; |
| 168 | 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(NetLogTempFile); | 169 DISALLOW_COPY_AND_ASSIGN(NetLogTempFile); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 } // namespace net_log | 172 } // namespace net_log |
| 173 | 173 |
| 174 #endif // COMPONENTS_NET_LOG_NET_LOG_TEMP_FILE_H_ | 174 #endif // COMPONENTS_NET_LOG_NET_LOG_TEMP_FILE_H_ |
| OLD | NEW |