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

Unified Diff: chrome/browser/ssl/chrome_ssl_host_state_delegate.cc

Issue 2888073002: Remove raw DictionaryValue::Set in //chrome (Closed)
Patch Set: Fix Tests 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
Index: chrome/browser/ssl/chrome_ssl_host_state_delegate.cc
diff --git a/chrome/browser/ssl/chrome_ssl_host_state_delegate.cc b/chrome/browser/ssl/chrome_ssl_host_state_delegate.cc
index 51640614b9c30738f62e398a1f70656684e7b268..d080dae377ef8d706d0cc9cdc90e948ef2b691de 100644
--- a/chrome/browser/ssl/chrome_ssl_host_state_delegate.cc
+++ b/chrome/browser/ssl/chrome_ssl_host_state_delegate.cc
@@ -16,6 +16,7 @@
#include "base/command_line.h"
#include "base/guid.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/field_trial.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/clock.h"
@@ -263,9 +264,9 @@ base::DictionaryValue* ChromeSSLHostStateDelegate::GetValidCertDecisionsDict(
if (create_entries == DO_NOT_CREATE_DICTIONARY_ENTRIES)
return NULL;
- cert_error_dict = new base::DictionaryValue();
- // dict takes ownership of cert_error_dict
- dict->Set(kSSLCertDecisionCertErrorMapKey, cert_error_dict);
+ cert_error_dict =
+ dict->SetDictionary(kSSLCertDecisionCertErrorMapKey,
+ base::MakeUnique<base::DictionaryValue>());
}
return cert_error_dict;

Powered by Google App Engine
This is Rietveld 408576698