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

Unified Diff: ios/chrome/browser/ui/webui/flags_ui.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
Index: ios/chrome/browser/ui/webui/flags_ui.cc
diff --git a/ios/chrome/browser/ui/webui/flags_ui.cc b/ios/chrome/browser/ui/webui/flags_ui.cc
index f9246dfbfe810a3987dc39c39196cb6b322fb2cb..67968c2c68992e1a6c7cbeb23acfc9f93af2b071 100644
--- a/ios/chrome/browser/ui/webui/flags_ui.cc
+++ b/ios/chrome/browser/ui/webui/flags_ui.cc
@@ -5,6 +5,7 @@
#include "ios/chrome/browser/ui/webui/flags_ui.h"
#include <string>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -155,12 +156,12 @@ void FlagsDOMHandler::HandleRequestExperimentalFeatures(
base::DictionaryValue results;
- std::unique_ptr<base::ListValue> supported_features(new base::ListValue);
- std::unique_ptr<base::ListValue> unsupported_features(new base::ListValue);
+ auto supported_features = base::MakeUnique<base::ListValue>();
+ auto unsupported_features = base::MakeUnique<base::ListValue>();
GetFlagFeatureEntries(flags_storage_.get(), access_, supported_features.get(),
unsupported_features.get());
- results.Set(flags_ui::kSupportedFeatures, supported_features.release());
- results.Set(flags_ui::kUnsupportedFeatures, unsupported_features.release());
+ results.Set(flags_ui::kSupportedFeatures, std::move(supported_features));
+ results.Set(flags_ui::kUnsupportedFeatures, std::move(unsupported_features));
// Cannot restart the browser on iOS.
results.SetBoolean(flags_ui::kNeedsRestart, false);
results.SetBoolean(flags_ui::kShowOwnerWarning,

Powered by Google App Engine
This is Rietveld 408576698