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

Side by Side Diff: net/log/trace_net_log_observer_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_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/trace_net_log_observer.h" 5 #include "net/log/trace_net_log_observer.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 continue; 120 continue;
121 } 121 }
122 std::string category; 122 std::string category;
123 if (!dict->GetString("cat", &category)) { 123 if (!dict->GetString("cat", &category)) {
124 ADD_FAILURE() 124 ADD_FAILURE()
125 << "Unexpected item without a category field in trace_events"; 125 << "Unexpected item without a category field in trace_events";
126 continue; 126 continue;
127 } 127 }
128 if (category != kNetLogTracingCategory) 128 if (category != kNetLogTracingCategory)
129 continue; 129 continue;
130 filtered_trace_events->Append(dict->DeepCopy()); 130 filtered_trace_events->Append(dict->CreateDeepCopy());
131 } 131 }
132 return filtered_trace_events; 132 return filtered_trace_events;
133 } 133 }
134 134
135 base::ListValue* trace_events() const { return trace_events_.get(); } 135 base::ListValue* trace_events() const { return trace_events_.get(); }
136 136
137 TestNetLog* net_log() { return &net_log_; } 137 TestNetLog* net_log() { return &net_log_; }
138 138
139 TraceNetLogObserver* trace_net_log_observer() const { 139 TraceNetLogObserver* trace_net_log_observer() const {
140 return trace_net_log_observer_.get(); 140 return trace_net_log_observer_.get();
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 EXPECT_TRUE(item1->GetString("args.params.foo", &item1_params)); 366 EXPECT_TRUE(item1->GetString("args.params.foo", &item1_params));
367 EXPECT_EQ("bar", item1_params); 367 EXPECT_EQ("bar", item1_params);
368 368
369 EXPECT_TRUE(item2->GetString("args.params", &item2_params)); 369 EXPECT_TRUE(item2->GetString("args.params", &item2_params));
370 EXPECT_TRUE(item2_params.empty()); 370 EXPECT_TRUE(item2_params.empty());
371 } 371 }
372 372
373 } // namespace 373 } // namespace
374 374
375 } // namespace net 375 } // namespace net
OLDNEW
« no previous file with comments | « net/log/net_log_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698