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

Side by Side Diff: device/bluetooth/bluetooth_socket_chromeos.cc

Issue 1124883004: Submission for C++ Readability (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "device/bluetooth/bluetooth_socket_chromeos.h" 5 #include "device/bluetooth/bluetooth_socket_chromeos.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 BluetoothSocketNet::Close(); 174 BluetoothSocketNet::Close();
175 } else { 175 } else {
176 DoCloseListening(); 176 DoCloseListening();
177 } 177 }
178 } 178 }
179 179
180 void BluetoothSocketChromeOS::Disconnect(const base::Closure& callback) { 180 void BluetoothSocketChromeOS::Disconnect(const base::Closure& callback) {
181 DCHECK(ui_task_runner()->RunsTasksOnCurrentThread()); 181 DCHECK(ui_task_runner()->RunsTasksOnCurrentThread());
182 182
183 if (profile_) 183 if (profile_)
184 UnregisterProfile(); 184 UnregisterProfile();
omoikane 2015/05/22 23:55:28 This line should be shifted 1 space right.
Marie Janssen 2015/06/18 21:08:35 Done.
185 185
186 if (!device_path_.value().empty()) { 186 if (!device_path_.value().empty()) {
187 BluetoothSocketNet::Disconnect(callback); 187 BluetoothSocketNet::Disconnect(callback);
188 } else { 188 } else {
189 DoCloseListening(); 189 DoCloseListening();
190 callback.Run(); 190 callback.Run();
191 } 191 }
192 } 192 }
193 193
194 void BluetoothSocketChromeOS::Accept( 194 void BluetoothSocketChromeOS::Accept(
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 DCHECK(profile_); 549 DCHECK(profile_);
550 550
551 VLOG(1) << profile_->object_path().value() << ": Release profile"; 551 VLOG(1) << profile_->object_path().value() << ": Release profile";
552 552
553 static_cast<BluetoothAdapterChromeOS*>(adapter_.get()) 553 static_cast<BluetoothAdapterChromeOS*>(adapter_.get())
554 ->ReleaseProfile(device_path_, profile_); 554 ->ReleaseProfile(device_path_, profile_);
555 profile_ = nullptr; 555 profile_ = nullptr;
556 } 556 }
557 557
558 } // namespace chromeos 558 } // namespace chromeos
559
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698