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

Side by Side Diff: components/pairing/bluetooth_host_pairing_controller.cc

Issue 656503005: Replace STAGE_PAIRING_DONE with STAGE_HOST_ENROLLMENT_SUCCESS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/pairing/bluetooth_host_pairing_controller.h" 5 #include "components/pairing/bluetooth_host_pairing_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/hash.h" 8 #include "base/hash.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 adapter_->SetDiscoverable( 228 adapter_->SetDiscoverable(
229 false, 229 false,
230 base::Bind(&BluetoothHostPairingController::OnSetDiscoverable, 230 base::Bind(&BluetoothHostPairingController::OnSetDiscoverable,
231 ptr_factory_.GetWeakPtr(), false), 231 ptr_factory_.GetWeakPtr(), false),
232 base::Bind(&BluetoothHostPairingController::OnSetError, 232 base::Bind(&BluetoothHostPairingController::OnSetError,
233 ptr_factory_.GetWeakPtr())); 233 ptr_factory_.GetWeakPtr()));
234 234
235 controller_socket_ = socket; 235 controller_socket_ = socket;
236 service_socket_ = NULL; 236 service_socket_ = NULL;
237 237
238 // TODO: Update Host. (http://crbug.com/405754)
239 SendHostStatus(); 238 SendHostStatus();
240 239
241 controller_socket_->Receive( 240 controller_socket_->Receive(
242 kReceiveSize, 241 kReceiveSize,
243 base::Bind(&BluetoothHostPairingController::OnReceiveComplete, 242 base::Bind(&BluetoothHostPairingController::OnReceiveComplete,
244 ptr_factory_.GetWeakPtr()), 243 ptr_factory_.GetWeakPtr()),
245 base::Bind(&BluetoothHostPairingController::OnReceiveError, 244 base::Bind(&BluetoothHostPairingController::OnReceiveError,
246 ptr_factory_.GetWeakPtr())); 245 ptr_factory_.GetWeakPtr()));
247 246
248 ChangeStage(STAGE_UPDATING); 247 ChangeStage(STAGE_UPDATING);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 ChangeStage(STAGE_WAITING_FOR_CODE_CONFIRMATION); 452 ChangeStage(STAGE_WAITING_FOR_CODE_CONFIRMATION);
454 } 453 }
455 454
456 void BluetoothHostPairingController::AuthorizePairing( 455 void BluetoothHostPairingController::AuthorizePairing(
457 device::BluetoothDevice* device) { 456 device::BluetoothDevice* device) {
458 // Disallow unknown device. 457 // Disallow unknown device.
459 device->RejectPairing(); 458 device->RejectPairing();
460 } 459 }
461 460
462 } // namespace pairing_chromeos 461 } // namespace pairing_chromeos
OLDNEW
« no previous file with comments | « components/pairing/bluetooth_controller_pairing_controller.cc ('k') | components/pairing/controller_pairing_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698