OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 REMOTING_BASE_VLOG_NET_LOG_H_ | 5 #ifndef REMOTING_BASE_VLOG_NET_LOG_H_ |
6 #define REMOTING_BASE_VLOG_NET_LOG_H_ | 6 #define REMOTING_BASE_VLOG_NET_LOG_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "net/log/net_log.h" | 11 #include "net/log/net_log.h" |
11 | 12 |
12 namespace remoting { | 13 namespace remoting { |
13 | 14 |
14 // Redirectes all networking events (i.e. events logged through net::NetLog) to | 15 // Redirectes all networking events (i.e. events logged through net::NetLog) to |
15 // VLOG(4). Note that an explicit reference to a net::NetLog object has to be | 16 // VLOG(4). Note that an explicit reference to a net::NetLog object has to be |
16 // passed to networking classes to receive the events. There is no global | 17 // passed to networking classes to receive the events. There is no global |
17 // network events logger exists. | 18 // network events logger exists. |
18 class VlogNetLog : public net::NetLog { | 19 class VlogNetLog : public net::NetLog { |
19 public: | 20 public: |
20 VlogNetLog(); | 21 VlogNetLog(); |
21 ~VlogNetLog() override; | 22 ~VlogNetLog() override; |
22 | 23 |
23 private: | 24 private: |
24 class Observer; | 25 class Observer; |
25 scoped_ptr<Observer> observer_; | 26 std::unique_ptr<Observer> observer_; |
26 | 27 |
27 DISALLOW_COPY_AND_ASSIGN(VlogNetLog); | 28 DISALLOW_COPY_AND_ASSIGN(VlogNetLog); |
28 }; | 29 }; |
29 | 30 |
30 } // namespace remoting | 31 } // namespace remoting |
31 | 32 |
32 #endif // REMOTING_BASE_VLOG_NET_LOG_H_ | 33 #endif // REMOTING_BASE_VLOG_NET_LOG_H_ |
OLD | NEW |