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

Unified Diff: extensions/browser/api/storage/settings_test_util.cc

Issue 2911033002: Remove raw base::DictionaryValue::Set (Closed)
Patch Set: Proper Windows Fix Created 3 years, 6 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/api/socket/socket_api.cc ('k') | google_apis/drive/drive_api_requests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/storage/settings_test_util.cc
diff --git a/extensions/browser/api/storage/settings_test_util.cc b/extensions/browser/api/storage/settings_test_util.cc
index 1b619ef6f1b15c533395ff2586bec191bb2bb6da..de30f6a09d343393b0ea4674194b3b607e088926 100644
--- a/extensions/browser/api/storage/settings_test_util.cc
+++ b/extensions/browser/api/storage/settings_test_util.cc
@@ -4,8 +4,12 @@
#include "extensions/browser/api/storage/settings_test_util.h"
+#include <utility>
+
#include "base/files/file_path.h"
+#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
+#include "base/values.h"
#include "extensions/browser/api/storage/storage_frontend.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system_provider.h"
@@ -77,18 +81,18 @@ scoped_refptr<const Extension> AddExtensionWithIdAndPermissions(
it != permissions_set.end(); ++it) {
permissions->AppendString(*it);
}
- manifest.Set("permissions", permissions.release());
+ manifest.Set("permissions", std::move(permissions));
switch (type) {
case Manifest::TYPE_EXTENSION:
break;
case Manifest::TYPE_LEGACY_PACKAGED_APP: {
- base::DictionaryValue* app = new base::DictionaryValue();
- base::DictionaryValue* app_launch = new base::DictionaryValue();
+ auto app = base::MakeUnique<base::DictionaryValue>();
+ auto app_launch = base::MakeUnique<base::DictionaryValue>();
app_launch->SetString("local_path", "fake.html");
- app->Set("launch", app_launch);
- manifest.Set("app", app);
+ app->Set("launch", std::move(app_launch));
+ manifest.Set("app", std::move(app));
break;
}
« no previous file with comments | « extensions/browser/api/socket/socket_api.cc ('k') | google_apis/drive/drive_api_requests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698