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

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

Issue 2014103002: Remove deprecated ListValue::Append(Value*) overload on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ADL fail Created 4 years, 3 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
Index: chrome/browser/net/referrer.cc
diff --git a/chrome/browser/net/referrer.cc b/chrome/browser/net/referrer.cc
index 50e7c542d066bce74a9d80de80aaaa58facbefb5..b72b6f2766e6bac6d9402f88dc68e36916739e69 100644
--- a/chrome/browser/net/referrer.cc
+++ b/chrome/browser/net/referrer.cc
@@ -12,6 +12,7 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/values.h"
#include "chrome/browser/net/predictor.h"
@@ -132,16 +133,11 @@ void Referrer::Deserialize(const base::Value& value) {
}
}
-base::Value* Referrer::Serialize() const {
- base::ListValue* subresource_list(new base::ListValue);
+std::unique_ptr<base::ListValue> Referrer::Serialize() const {
+ auto subresource_list = base::MakeUnique<base::ListValue>();
for (const_iterator it = begin(); it != end(); ++it) {
- std::unique_ptr<base::StringValue> url_spec(
- new base::StringValue(it->first.spec()));
- std::unique_ptr<base::FundamentalValue> rate(
- new base::FundamentalValue(it->second.subresource_use_rate()));
-
- subresource_list->Append(std::move(url_spec));
- subresource_list->Append(std::move(rate));
+ subresource_list->AppendString(it->first.spec());
+ subresource_list->AppendDouble(it->second.subresource_use_rate());
}
return subresource_list;
}
« no previous file with comments | « chrome/browser/net/referrer.h ('k') | chrome/browser/signin/mutable_profile_oauth2_token_service_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698