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

Unified Diff: chrome/browser/extensions/extension_install_prompt.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/extension_install_prompt.cc
diff --git a/chrome/browser/extensions/extension_install_prompt.cc b/chrome/browser/extensions/extension_install_prompt.cc
index 03e38b77db7fa7e950971263ed51960de1690b1d..3712420e24a7336252aa58c3b549b37f664cf396 100644
--- a/chrome/browser/extensions/extension_install_prompt.cc
+++ b/chrome/browser/extensions/extension_install_prompt.cc
@@ -8,6 +8,7 @@
#include "base/callback_helpers.h"
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -593,7 +594,7 @@ scoped_refptr<Extension>
const std::string& localized_name,
const std::string& localized_description,
std::string* error) {
- scoped_ptr<base::DictionaryValue> localized_manifest;
+ std::unique_ptr<base::DictionaryValue> localized_manifest;
if (!localized_name.empty() || !localized_description.empty()) {
localized_manifest.reset(manifest->DeepCopy());
if (!localized_name.empty()) {
@@ -647,14 +648,15 @@ void ExtensionInstallPrompt::ShowDialog(
const SkBitmap* icon,
const ShowDialogCallback& show_dialog_callback) {
ShowDialog(done_callback, extension, icon,
- make_scoped_ptr(new Prompt(INSTALL_PROMPT)), show_dialog_callback);
+ base::WrapUnique(new Prompt(INSTALL_PROMPT)),
+ show_dialog_callback);
}
void ExtensionInstallPrompt::ShowDialog(
const DoneCallback& done_callback,
const Extension* extension,
const SkBitmap* icon,
- scoped_ptr<Prompt> prompt,
+ std::unique_ptr<Prompt> prompt,
const ShowDialogCallback& show_dialog_callback) {
ShowDialog(done_callback, extension, icon, std::move(prompt), nullptr,
show_dialog_callback);
@@ -664,8 +666,8 @@ void ExtensionInstallPrompt::ShowDialog(
const DoneCallback& done_callback,
const Extension* extension,
const SkBitmap* icon,
- scoped_ptr<Prompt> prompt,
- scoped_ptr<const PermissionSet> custom_permissions,
+ std::unique_ptr<Prompt> prompt,
+ std::unique_ptr<const PermissionSet> custom_permissions,
const ShowDialogCallback& show_dialog_callback) {
DCHECK(ui_loop_ == base::MessageLoop::current());
DCHECK(prompt);
@@ -757,7 +759,7 @@ void ExtensionInstallPrompt::LoadImageIfNeeded() {
}
void ExtensionInstallPrompt::ShowConfirmation() {
- scoped_ptr<const PermissionSet> permissions_wrapper;
+ std::unique_ptr<const PermissionSet> permissions_wrapper;
const PermissionSet* permissions_to_display = nullptr;
if (custom_permissions_.get()) {
permissions_to_display = custom_permissions_.get();
« no previous file with comments | « chrome/browser/extensions/extension_install_prompt.h ('k') | chrome/browser/extensions/extension_install_prompt_show_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698