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

Unified Diff: chrome/browser/net/predictor_unittest.cc

Issue 2030013003: Remove ListValue::Append(new {Fundamental,String}Value(...)) pattern in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/predictor.cc ('k') | chrome/browser/notifications/notifier_state_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/predictor_unittest.cc
diff --git a/chrome/browser/net/predictor_unittest.cc b/chrome/browser/net/predictor_unittest.cc
index 249c9fa9551807e098adc4122de3d1c4bfcd1c6e..4751271b9d5cc7295e5c93f41774c5d4780ee23d 100644
--- a/chrome/browser/net/predictor_unittest.cc
+++ b/chrome/browser/net/predictor_unittest.cc
@@ -81,8 +81,7 @@ static base::ListValue* FindSerializationMotivation(
// Create a new empty serialization list.
static base::ListValue* NewEmptySerializationList() {
base::ListValue* list = new base::ListValue;
- list->Append(
- new base::FundamentalValue(Predictor::kPredictorReferrerVersion));
+ list->AppendInteger(Predictor::kPredictorReferrerVersion);
return list;
}
@@ -99,7 +98,7 @@ static void AddToSerializedList(const GURL& motivation,
if (!motivation_list) {
// This is the first mention of this motivation, so build a list.
motivation_list = new base::ListValue;
- motivation_list->Append(new base::StringValue(motivation.spec()));
+ motivation_list->AppendString(motivation.spec());
// Provide empty subresource list.
motivation_list->Append(new base::ListValue());
@@ -115,8 +114,8 @@ static void AddToSerializedList(const GURL& motivation,
// case, during deserialization, the latency value we supply plus the
// existing value(s) will be added to the referrer.
- subresource_list->Append(new base::StringValue(subresource.spec()));
- subresource_list->Append(new base::FundamentalValue(use_rate));
+ subresource_list->AppendString(subresource.spec());
+ subresource_list->AppendDouble(use_rate);
}
// For a given motivation, and subresource, find what latency is currently
« no previous file with comments | « chrome/browser/net/predictor.cc ('k') | chrome/browser/notifications/notifier_state_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698