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

Unified Diff: chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc

Issue 2811673002: Reland: Stop passing raw pointers to base::Value API in c/b/chromeos and c/b/extensions (Closed)
Patch Set: Workaround with std::move Created 3 years, 8 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/component_updater/supervised_user_whitelist_installer_unittest.cc
diff --git a/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc b/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc
index e1f0eb273feed97ad0613814cf71b298bd17812b..fe926866d0789c20c6a6f0ecb219ed3f0d02d51e 100644
--- a/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc
+++ b/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc
@@ -4,6 +4,8 @@
#include <stddef.h>
+#include <utility>
+
#include "base/bind.h"
#include "base/callback.h"
#include "base/files/file_path.h"
@@ -236,13 +238,13 @@ class SupervisedUserWhitelistInstallerTest : public testing::Test {
std::unique_ptr<base::DictionaryValue> whitelist_dict(
new base::DictionaryValue);
whitelist_dict->SetString("sites", kWhitelistFile);
- manifest_.Set("whitelisted_content", whitelist_dict.release());
+ manifest_.Set("whitelisted_content", std::move(whitelist_dict));
large_icon_path_ = whitelist_version_directory_.AppendASCII(kLargeIconFile);
std::unique_ptr<base::DictionaryValue> icons_dict(
new base::DictionaryValue);
icons_dict->SetString("128", kLargeIconFile);
- manifest_.Set("icons", icons_dict.release());
+ manifest_.Set("icons", std::move(icons_dict));
manifest_.SetString("version", kVersion);
@@ -251,8 +253,8 @@ class SupervisedUserWhitelistInstallerTest : public testing::Test {
std::unique_ptr<base::ListValue> clients(new base::ListValue);
clients->AppendString(kClientId);
clients->AppendString(kOtherClientId);
- crx_dict->Set("clients", clients.release());
- pref_.Set(kCrxId, crx_dict.release());
+ crx_dict->Set("clients", std::move(clients));
+ pref_.Set(kCrxId, std::move(crx_dict));
}
protected:

Powered by Google App Engine
This is Rietveld 408576698