Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: net/log/test_net_log.h

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/log/net_log_util_unittest.cc ('k') | net/log/test_net_log.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_LOG_TEST_NET_LOG_H_ 5 #ifndef NET_LOG_TEST_NET_LOG_H_
6 #define NET_LOG_TEST_NET_LOG_H_ 6 #define NET_LOG_TEST_NET_LOG_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 25 matching lines...) Expand all
36 36
37 // Returns a NetLog observer that will write entries to the TestNetLog's event 37 // Returns a NetLog observer that will write entries to the TestNetLog's event
38 // store. For testing code that bypasses NetLogs and adds events directly to 38 // store. For testing code that bypasses NetLogs and adds events directly to
39 // an observer. 39 // an observer.
40 NetLog::ThreadSafeObserver* GetObserver() const; 40 NetLog::ThreadSafeObserver* GetObserver() const;
41 41
42 private: 42 private:
43 // The underlying observer class that does all the work. 43 // The underlying observer class that does all the work.
44 class Observer; 44 class Observer;
45 45
46 scoped_ptr<Observer> observer_; 46 std::unique_ptr<Observer> observer_;
47 47
48 DISALLOW_COPY_AND_ASSIGN(TestNetLog); 48 DISALLOW_COPY_AND_ASSIGN(TestNetLog);
49 }; 49 };
50 50
51 // Helper class that exposes a similar API as BoundNetLog, but uses a 51 // Helper class that exposes a similar API as BoundNetLog, but uses a
52 // TestNetLog rather than the more generic NetLog. 52 // TestNetLog rather than the more generic NetLog.
53 // 53 //
54 // A BoundTestNetLog can easily be converted to a BoundNetLog using the 54 // A BoundTestNetLog can easily be converted to a BoundNetLog using the
55 // bound() method. 55 // bound() method.
56 class BoundTestNetLog { 56 class BoundTestNetLog {
(...skipping 22 matching lines...) Expand all
79 private: 79 private:
80 TestNetLog test_net_log_; 80 TestNetLog test_net_log_;
81 const BoundNetLog net_log_; 81 const BoundNetLog net_log_;
82 82
83 DISALLOW_COPY_AND_ASSIGN(BoundTestNetLog); 83 DISALLOW_COPY_AND_ASSIGN(BoundTestNetLog);
84 }; 84 };
85 85
86 } // namespace net 86 } // namespace net
87 87
88 #endif // NET_LOG_TEST_NET_LOG_H_ 88 #endif // NET_LOG_TEST_NET_LOG_H_
OLDNEW
« no previous file with comments | « net/log/net_log_util_unittest.cc ('k') | net/log/test_net_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698