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

Side by Side Diff: extensions/browser/api/bluetooth/bluetooth_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 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 "extensions/browser/api/bluetooth/bluetooth_api.h" 5 #include "extensions/browser/api/bluetooth/bluetooth_api.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 event_router()->OnListenerRemoved(); 98 event_router()->OnListenerRemoved();
99 } 99 }
100 100
101 namespace api { 101 namespace api {
102 102
103 BluetoothGetAdapterStateFunction::~BluetoothGetAdapterStateFunction() {} 103 BluetoothGetAdapterStateFunction::~BluetoothGetAdapterStateFunction() {}
104 104
105 bool BluetoothGetAdapterStateFunction::DoWork( 105 bool BluetoothGetAdapterStateFunction::DoWork(
106 scoped_refptr<BluetoothAdapter> adapter) { 106 scoped_refptr<BluetoothAdapter> adapter) {
107 bluetooth::AdapterState state; 107 bluetooth::AdapterState state;
108 PopulateAdapterState(*adapter.get(), &state); 108 PopulateAdapterState(*adapter, &state);
109 results_ = bluetooth::GetAdapterState::Results::Create(state); 109 results_ = bluetooth::GetAdapterState::Results::Create(state);
110 SendResponse(true); 110 SendResponse(true);
111 return true; 111 return true;
112 } 112 }
113 113
114 BluetoothGetDevicesFunction::~BluetoothGetDevicesFunction() {} 114 BluetoothGetDevicesFunction::~BluetoothGetDevicesFunction() {}
115 115
116 bool BluetoothGetDevicesFunction::DoWork( 116 bool BluetoothGetDevicesFunction::DoWork(
117 scoped_refptr<BluetoothAdapter> adapter) { 117 scoped_refptr<BluetoothAdapter> adapter) {
118 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 118 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 ->StopDiscoverySession( 196 ->StopDiscoverySession(
197 adapter.get(), GetExtensionId(), 197 adapter.get(), GetExtensionId(),
198 base::Bind(&BluetoothStopDiscoveryFunction::OnSuccessCallback, this), 198 base::Bind(&BluetoothStopDiscoveryFunction::OnSuccessCallback, this),
199 base::Bind(&BluetoothStopDiscoveryFunction::OnErrorCallback, this)); 199 base::Bind(&BluetoothStopDiscoveryFunction::OnErrorCallback, this));
200 200
201 return true; 201 return true;
202 } 202 }
203 203
204 } // namespace api 204 } // namespace api
205 } // namespace extensions 205 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/app_window/app_window_api.cc ('k') | extensions/browser/api/bluetooth/bluetooth_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698