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

Unified Diff: components/web_modal/web_contents_modal_dialog_manager.cc

Issue 1917673002: Convert //components/[u-z]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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: components/web_modal/web_contents_modal_dialog_manager.cc
diff --git a/components/web_modal/web_contents_modal_dialog_manager.cc b/components/web_modal/web_contents_modal_dialog_manager.cc
index e940b077a002f604a4b5918b56598bf2bb50f97e..52b404580291059c6c5d0bd1338ffbb2788ad2e6 100644
--- a/components/web_modal/web_contents_modal_dialog_manager.cc
+++ b/components/web_modal/web_contents_modal_dialog_manager.cc
@@ -36,7 +36,7 @@ void WebContentsModalDialogManager::SetDelegate(
}
void WebContentsModalDialogManager::ShowModalDialog(gfx::NativeWindow dialog) {
- scoped_ptr<SingleWebContentsDialogManager> mgr(
+ std::unique_ptr<SingleWebContentsDialogManager> mgr(
CreateNativeWebModalManager(dialog, this));
ShowDialogWithManager(dialog, std::move(mgr));
}
@@ -44,7 +44,7 @@ void WebContentsModalDialogManager::ShowModalDialog(gfx::NativeWindow dialog) {
// TODO(gbillock): Maybe "ShowBubbleWithManager"?
void WebContentsModalDialogManager::ShowDialogWithManager(
gfx::NativeWindow dialog,
- scoped_ptr<SingleWebContentsDialogManager> manager) {
+ std::unique_ptr<SingleWebContentsDialogManager> manager) {
if (delegate_)
manager->HostChanged(delegate_->GetWebContentsModalDialogHost());
child_dialogs_.push_back(new DialogState(dialog, std::move(manager)));
@@ -78,7 +78,7 @@ void WebContentsModalDialogManager::WillClose(gfx::NativeWindow dialog) {
return;
bool removed_topmost_dialog = dlg == child_dialogs_.begin();
- scoped_ptr<DialogState> deleter(*dlg);
+ std::unique_ptr<DialogState> deleter(*dlg);
child_dialogs_.erase(dlg);
if (!child_dialogs_.empty() && removed_topmost_dialog &&
!closing_all_dialogs_) {
@@ -97,10 +97,8 @@ WebContentsModalDialogManager::WebContentsModalDialogManager(
WebContentsModalDialogManager::DialogState::DialogState(
gfx::NativeWindow dialog,
- scoped_ptr<SingleWebContentsDialogManager> mgr)
- : dialog(dialog),
- manager(mgr.release()) {
-}
+ std::unique_ptr<SingleWebContentsDialogManager> mgr)
+ : dialog(dialog), manager(mgr.release()) {}
WebContentsModalDialogManager::DialogState::~DialogState() {}

Powered by Google App Engine
This is Rietveld 408576698