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

Unified Diff: extensions/common/url_pattern_set.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
« no previous file with comments | « extensions/browser/script_executor.cc ('k') | net/http/http_server_properties_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/url_pattern_set.cc
diff --git a/extensions/common/url_pattern_set.cc b/extensions/common/url_pattern_set.cc
index 8a2de4a76d1a536030a28046ec1b20136ce3f510..2ec0074c352831f6711b7e6229df0daa4ac2a2b3 100644
--- a/extensions/common/url_pattern_set.cc
+++ b/extensions/common/url_pattern_set.cc
@@ -9,6 +9,7 @@
#include "base/logging.h"
#include "base/memory/linked_ptr.h"
+#include "base/memory/ptr_util.h"
#include "base/stl_util.h"
#include "base/values.h"
#include "extensions/common/error_utils.h"
@@ -233,7 +234,8 @@ std::unique_ptr<base::ListValue> URLPatternSet::ToValue() const {
std::unique_ptr<base::ListValue> value(new base::ListValue);
for (URLPatternSet::const_iterator i = patterns_.begin();
i != patterns_.end(); ++i)
- value->AppendIfNotPresent(new base::StringValue(i->GetAsString()));
+ value->AppendIfNotPresent(
+ base::MakeUnique<base::StringValue>(i->GetAsString()));
return value;
}
« no previous file with comments | « extensions/browser/script_executor.cc ('k') | net/http/http_server_properties_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698