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

Unified Diff: chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc

Issue 2086663003: Change ChooserController ownership model (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build errors Created 4 years, 6 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/bluetooth/chrome_extension_bluetooth_chooser.cc
diff --git a/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc b/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc
index bb653096282127a0834a23019250b6b20dbb1b07..e27f1ded72a06388a439acc8d4d601b1fbf199a6 100644
--- a/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc
+++ b/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc
@@ -11,11 +11,12 @@
ChromeExtensionBluetoothChooser::ChromeExtensionBluetoothChooser(
content::RenderFrameHost* frame,
const content::BluetoothChooser::EventHandler& event_handler) {
- bluetooth_chooser_controller_.reset(
+ std::unique_ptr<BluetoothChooserController> bluetooth_chooser_controller(
new BluetoothChooserController(frame, event_handler));
+ bluetooth_chooser_controller_ = bluetooth_chooser_controller.get();
Reilly Grant (use Gerrit) 2016/06/22 00:01:32 Please add a comment here explaining why storing t
juncai 2016/06/22 01:17:45 Done.
chooser_dialog_.reset(new ChromeExtensionChooserDialog(
content::WebContents::FromRenderFrameHost(frame)));
- chooser_dialog_->ShowDialog(bluetooth_chooser_controller_.get());
+ chooser_dialog_->ShowDialog(std::move(bluetooth_chooser_controller));
}
ChromeExtensionBluetoothChooser::~ChromeExtensionBluetoothChooser() {}

Powered by Google App Engine
This is Rietveld 408576698