OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef NET_SSL_SSL_KEY_LOGGER_H_ | 5 #ifndef NET_SSL_SSL_KEY_LOGGER_H_ |
6 #define NET_SSL_SSL_KEY_LOGGER_H_ | 6 #define NET_SSL_SSL_KEY_LOGGER_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 class FilePath; | 15 class FilePath; |
16 class SequencedTaskRunner; | 16 class SequencedTaskRunner; |
17 } | 17 } |
18 | 18 |
19 namespace net { | 19 namespace net { |
20 | 20 |
21 // SSLKeyLogger logs SSL key material for debugging purposes. This should only | 21 // SSLKeyLogger logs SSL key material for debugging purposes. This should only |
22 // be used when requested by the user, typically via the SSLKEYLOGFILE | 22 // be used when requested by the user, typically via the SSLKEYLOGFILE |
(...skipping 10 matching lines...) Expand all Loading... |
33 // Writes |line| followed by a newline. This may be called by multiple threads | 33 // Writes |line| followed by a newline. This may be called by multiple threads |
34 // simultaneously. If two calls race, the order of the lines is undefined, but | 34 // simultaneously. If two calls race, the order of the lines is undefined, but |
35 // each line will be written atomically. | 35 // each line will be written atomically. |
36 void WriteLine(const std::string& line); | 36 void WriteLine(const std::string& line); |
37 | 37 |
38 private: | 38 private: |
39 class Core; | 39 class Core; |
40 | 40 |
41 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 41 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
42 // Destroyed on |task_runner_|. | 42 // Destroyed on |task_runner_|. |
43 scoped_ptr<Core> core_; | 43 std::unique_ptr<Core> core_; |
44 | 44 |
45 DISALLOW_COPY_AND_ASSIGN(SSLKeyLogger); | 45 DISALLOW_COPY_AND_ASSIGN(SSLKeyLogger); |
46 }; | 46 }; |
47 | 47 |
48 } // namespace net | 48 } // namespace net |
49 | 49 |
50 #endif // NET_SSL_SSL_KEY_LOGGER_H_ | 50 #endif // NET_SSL_SSL_KEY_LOGGER_H_ |
OLD | NEW |