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

Unified Diff: chrome/browser/extensions/api/preference/chrome_direct_setting_api.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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/extensions/api/preference/chrome_direct_setting_api.cc
diff --git a/chrome/browser/extensions/api/preference/chrome_direct_setting_api.cc b/chrome/browser/extensions/api/preference/chrome_direct_setting_api.cc
index 635d127c55e5e4556d69327b5c262854cebcba93..0a35340e620a29b7cde5e4b618e2666e3d625c21 100644
--- a/chrome/browser/extensions/api/preference/chrome_direct_setting_api.cc
+++ b/chrome/browser/extensions/api/preference/chrome_direct_setting_api.cc
@@ -136,7 +136,7 @@ void ChromeDirectSettingAPI::OnPrefChanged(
profile_->GetPrefs()->FindPreference(pref_key.c_str());
const base::Value* value = preference->GetValue();
- scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue);
+ std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue);
result->Set(preference_api_constants::kValue, value->DeepCopy());
base::ListValue args;
args.Append(result.release());
@@ -145,7 +145,7 @@ void ChromeDirectSettingAPI::OnPrefChanged(
ExtensionRegistry::Get(profile_)->enabled_extensions()) {
const std::string& extension_id = extension->id();
if (router->ExtensionHasEventListener(extension_id, event_name)) {
- scoped_ptr<base::ListValue> args_copy(args.DeepCopy());
+ std::unique_ptr<base::ListValue> args_copy(args.DeepCopy());
// TODO(kalman): Have a histogram value for each pref type.
// This isn't so important for the current use case of these
// histograms, which is to track which event types are waking up event
@@ -157,7 +157,7 @@ void ChromeDirectSettingAPI::OnPrefChanged(
// to change.
events::HistogramValue histogram_value =
events::TYPES_PRIVATE_CHROME_DIRECT_SETTING_ON_CHANGE;
- scoped_ptr<Event> event(
+ std::unique_ptr<Event> event(
new Event(histogram_value, event_name, std::move(args_copy)));
router->DispatchEventToExtension(extension_id, std::move(event));
}

Powered by Google App Engine
This is Rietveld 408576698