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

Unified Diff: extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc

Issue 2137013005: [Extensions] Code Cleanup - Remove redundant smart-ptr get()s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc
diff --git a/extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc b/extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc
index cd3bd1c452e3f7661141dd6c58b24e1735efdea1..1aa75322862e99a797123862fdaddc7017136006 100644
--- a/extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc
+++ b/extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc
@@ -62,15 +62,15 @@ SocketInfo CreateSocketInfo(int socket_id, BluetoothApiSocket* socket) {
void SetSocketProperties(BluetoothApiSocket* socket,
SocketProperties* properties) {
if (properties->name.get()) {
- socket->set_name(*properties->name.get());
+ socket->set_name(*properties->name);
}
if (properties->persistent.get()) {
- socket->set_persistent(*properties->persistent.get());
+ socket->set_persistent(*properties->persistent);
}
if (properties->buffer_size.get()) {
// buffer size is validated when issuing the actual Recv operation
// on the socket.
- socket->set_buffer_size(*properties->buffer_size.get());
+ socket->set_buffer_size(*properties->buffer_size);
}
}
@@ -195,8 +195,7 @@ void BluetoothSocketCreateFunction::Work() {
BluetoothApiSocket* socket = new BluetoothApiSocket(extension_id());
- bluetooth_socket::SocketProperties* properties =
- params_.get()->properties.get();
+ bluetooth_socket::SocketProperties* properties = params_->properties.get();
if (properties) {
SetSocketProperties(socket, properties);
}
@@ -224,7 +223,7 @@ void BluetoothSocketUpdateFunction::Work() {
return;
}
- SetSocketProperties(socket, &params_.get()->properties);
+ SetSocketProperties(socket, &params_->properties);
results_ = bluetooth_socket::Update::Results::Create();
}

Powered by Google App Engine
This is Rietveld 408576698