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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc

Issue 2336863003: Change more base::ListValue methods to use std::unique_ptr. (Closed)
Patch Set: . 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: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc
index 8011688749fab97da201b55dddcd780135725528..245d75c16c7d1102075227bcc235d04f73a9ca85 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/time.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h"
@@ -62,9 +63,10 @@ void DataReductionProxySettingsTestBase::SetUp() {
ListPrefUpdate received_update(test_context_->pref_service(),
prefs::kDailyHttpReceivedContentLength);
for (int64_t i = 0; i < kNumDaysInHistory; i++) {
- original_update->Insert(0,
- new base::StringValue(base::Int64ToString(2 * i)));
- received_update->Insert(0, new base::StringValue(base::Int64ToString(i)));
+ original_update->Insert(
+ 0, base::MakeUnique<base::StringValue>(base::Int64ToString(2 * i)));
+ received_update->Insert(
+ 0, base::MakeUnique<base::StringValue>(base::Int64ToString(i)));
}
last_update_time_ = base::Time::Now().LocalMidnight();
pref_service->SetInt64(prefs::kDailyHttpContentLengthLastUpdateDate,

Powered by Google App Engine
This is Rietveld 408576698