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

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc

Issue 2889163002: Remove raw DictionaryValue::Set in //components (Closed)
Patch Set: Nits Created 3 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 | « components/cloud_devices/common/printer_description.cc ('k') | components/domain_reliability/beacon.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc
index fd6ddc7bd21373dc5f33ef6c8f423f1d5744c931..ee0fa9dfcd1db9c69ad6f7019832393e920091c3 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc
@@ -106,8 +106,8 @@ DataReductionProxyEventStore::GetSummaryValue() const {
auto data_reduction_proxy_values = base::MakeUnique<base::DictionaryValue>();
data_reduction_proxy_values->SetBoolean("enabled", enabled_);
if (current_configuration_) {
- data_reduction_proxy_values->Set("proxy_config",
- current_configuration_->DeepCopy());
+ data_reduction_proxy_values->Set(
+ "proxy_config", base::MakeUnique<base::Value>(*current_configuration_));
}
switch (secure_proxy_check_state_) {
@@ -129,8 +129,8 @@ DataReductionProxyEventStore::GetSummaryValue() const {
int current_time_ticks_ms =
(base::TimeTicks::Now() - base::TimeTicks()).InMilliseconds();
if (expiration_ticks_ > current_time_ticks_ms) {
- data_reduction_proxy_values->Set("last_bypass",
- last_bypass_event->DeepCopy());
+ data_reduction_proxy_values->Set(
+ "last_bypass", base::MakeUnique<base::Value>(*last_bypass_event));
}
}
« no previous file with comments | « components/cloud_devices/common/printer_description.cc ('k') | components/domain_reliability/beacon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698