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

Side by Side Diff: net/log/net_log_unittest.cc

Issue 2086763002: Don't use deprecated ListValue::Append(Value*) overload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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.cc ('k') | net/log/trace_net_log_observer_unittest.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) 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 #include "net/log/net_log.h" 5 #include "net/log/net_log.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 public: 127 public:
128 LoggingObserver() {} 128 LoggingObserver() {}
129 129
130 ~LoggingObserver() override { 130 ~LoggingObserver() override {
131 if (net_log()) 131 if (net_log())
132 net_log()->DeprecatedRemoveObserver(this); 132 net_log()->DeprecatedRemoveObserver(this);
133 } 133 }
134 134
135 void OnAddEntry(const NetLog::Entry& entry) override { 135 void OnAddEntry(const NetLog::Entry& entry) override {
136 std::unique_ptr<base::DictionaryValue> dict = 136 std::unique_ptr<base::DictionaryValue> dict =
137 base::DictionaryValue::From(base::WrapUnique(entry.ToValue())); 137 base::DictionaryValue::From(entry.ToValue());
138 ASSERT_TRUE(dict); 138 ASSERT_TRUE(dict);
139 values_.push_back(std::move(dict)); 139 values_.push_back(std::move(dict));
140 } 140 }
141 141
142 size_t GetNumValues() const { return values_.size(); } 142 size_t GetNumValues() const { return values_.size(); }
143 base::DictionaryValue* GetValue(size_t index) const { 143 base::DictionaryValue* GetValue(size_t index) const {
144 return values_[index].get(); 144 return values_[index].get();
145 } 145 }
146 146
147 private: 147 private:
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 NetLog net_log; 396 NetLog net_log;
397 397
398 // Run a bunch of threads to completion, each of which will repeatedly add 398 // Run a bunch of threads to completion, each of which will repeatedly add
399 // and remove an observer, and set its logging level. 399 // and remove an observer, and set its logging level.
400 RunTestThreads<AddRemoveObserverTestThread>(&net_log); 400 RunTestThreads<AddRemoveObserverTestThread>(&net_log);
401 } 401 }
402 402
403 } // namespace 403 } // namespace
404 404
405 } // namespace net 405 } // namespace net
OLDNEW
« no previous file with comments | « net/log/net_log.cc ('k') | net/log/trace_net_log_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698