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

Side by Side Diff: chrome/browser/ui/extensions/extension_install_ui_default.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/extensions/extension_install_ui_default.h" 5 #include "chrome/browser/ui/extensions/extension_install_ui_default.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 extensions::CrxInstallError error_; 93 extensions::CrxInstallError error_;
94 94
95 DISALLOW_COPY_AND_ASSIGN(ErrorInfoBarDelegate); 95 DISALLOW_COPY_AND_ASSIGN(ErrorInfoBarDelegate);
96 }; 96 };
97 97
98 // static 98 // static
99 void ErrorInfoBarDelegate::Create(InfoBarService* infobar_service, 99 void ErrorInfoBarDelegate::Create(InfoBarService* infobar_service,
100 const extensions::CrxInstallError& error) { 100 const extensions::CrxInstallError& error) {
101 infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar( 101 infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
102 scoped_ptr<ConfirmInfoBarDelegate>(new ErrorInfoBarDelegate(error)))); 102 std::unique_ptr<ConfirmInfoBarDelegate>(
103 new ErrorInfoBarDelegate(error))));
103 } 104 }
104 105
105 ErrorInfoBarDelegate::ErrorInfoBarDelegate( 106 ErrorInfoBarDelegate::ErrorInfoBarDelegate(
106 const extensions::CrxInstallError& error) 107 const extensions::CrxInstallError& error)
107 : ConfirmInfoBarDelegate(), error_(error) { 108 : ConfirmInfoBarDelegate(), error_(error) {
108 } 109 }
109 110
110 ErrorInfoBarDelegate::~ErrorInfoBarDelegate() { 111 ErrorInfoBarDelegate::~ErrorInfoBarDelegate() {
111 } 112 }
112 113
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 253
253 gfx::NativeWindow ExtensionInstallUIDefault::GetDefaultInstallDialogParent() { 254 gfx::NativeWindow ExtensionInstallUIDefault::GetDefaultInstallDialogParent() {
254 Browser* browser = chrome::FindLastActiveWithProfile(profile_); 255 Browser* browser = chrome::FindLastActiveWithProfile(profile_);
255 if (browser) { 256 if (browser) {
256 content::WebContents* contents = 257 content::WebContents* contents =
257 browser->tab_strip_model()->GetActiveWebContents(); 258 browser->tab_strip_model()->GetActiveWebContents();
258 return contents->GetTopLevelNativeWindow(); 259 return contents->GetTopLevelNativeWindow();
259 } 260 }
260 return NULL; 261 return NULL;
261 } 262 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/extension_enable_flow.cc ('k') | chrome/browser/ui/extensions/extension_install_ui_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698