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

Unified Diff: chrome/browser/ui/webui/options/core_options_handler.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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/ui/webui/options/core_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/core_options_handler.cc b/chrome/browser/ui/webui/options/core_options_handler.cc
index ce7f6d9741eb5bcdac7ea945b5c8e0a8a74e5f49..f59c4c1f246326e4eb4dc95add497797e57618de 100644
--- a/chrome/browser/ui/webui/options/core_options_handler.cc
+++ b/chrome/browser/ui/webui/options/core_options_handler.cc
@@ -5,12 +5,13 @@
#include "chrome/browser/ui/webui/options/core_options_handler.h"
#include <stddef.h>
+
+#include <memory>
#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/json/json_reader.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
@@ -344,14 +345,14 @@ void CoreOptionsHandler::ProcessUserMetric(const base::Value* value,
void CoreOptionsHandler::NotifyPrefChanged(
const std::string& pref_name,
const std::string& controlling_pref_name) {
- scoped_ptr<base::Value> value(
+ std::unique_ptr<base::Value> value(
CreateValueForPref(pref_name, controlling_pref_name));
DispatchPrefChangeNotification(pref_name, std::move(value));
}
void CoreOptionsHandler::DispatchPrefChangeNotification(
const std::string& name,
- scoped_ptr<base::Value> value) {
+ std::unique_ptr<base::Value> value) {
std::pair<PreferenceCallbackMap::const_iterator,
PreferenceCallbackMap::const_iterator> range =
pref_callback_map_.equal_range(name);
@@ -540,7 +541,7 @@ void CoreOptionsHandler::HandleSetPref(const base::ListValue* args,
if (!args->Get(1, &value))
return;
- scoped_ptr<base::Value> temp_value;
+ std::unique_ptr<base::Value> temp_value;
switch (type) {
case TYPE_BOOLEAN:
« no previous file with comments | « chrome/browser/ui/webui/options/core_options_handler.h ('k') | chrome/browser/ui/webui/options/create_profile_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698