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

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

Issue 491943004: Update the pairing API to include configuration and enrollment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error Created 6 years, 3 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 | Annotate | Revision Log
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/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "components/pairing/bluetooth_pairing_constants.h" 10 #include "components/pairing/bluetooth_pairing_constants.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 std::string BluetoothHostPairingController::GetConfirmationCode() { 323 std::string BluetoothHostPairingController::GetConfirmationCode() {
324 DCHECK_EQ(current_stage_, STAGE_WAITING_FOR_CODE_CONFIRMATION); 324 DCHECK_EQ(current_stage_, STAGE_WAITING_FOR_CODE_CONFIRMATION);
325 return confirmation_code_; 325 return confirmation_code_;
326 } 326 }
327 327
328 std::string BluetoothHostPairingController::GetEnrollmentDomain() { 328 std::string BluetoothHostPairingController::GetEnrollmentDomain() {
329 return enrollment_domain_; 329 return enrollment_domain_;
330 } 330 }
331 331
332 void BluetoothHostPairingController::OnUpdateStatusChanged(
333 UpdateStatus update_status) {
334 // TODO(zork): Handling updating stages (http://crbug.com/405754).
335 }
336
332 void BluetoothHostPairingController::RequestPinCode( 337 void BluetoothHostPairingController::RequestPinCode(
333 device::BluetoothDevice* device) { 338 device::BluetoothDevice* device) {
334 // Disallow unknown device. 339 // Disallow unknown device.
335 device->RejectPairing(); 340 device->RejectPairing();
336 } 341 }
337 342
338 void BluetoothHostPairingController::RequestPasskey( 343 void BluetoothHostPairingController::RequestPasskey(
339 device::BluetoothDevice* device) { 344 device::BluetoothDevice* device) {
340 // Disallow unknown device. 345 // Disallow unknown device.
341 device->RejectPairing(); 346 device->RejectPairing();
(...skipping 28 matching lines...) Expand all
370 ChangeStage(STAGE_WAITING_FOR_CODE_CONFIRMATION); 375 ChangeStage(STAGE_WAITING_FOR_CODE_CONFIRMATION);
371 } 376 }
372 377
373 void BluetoothHostPairingController::AuthorizePairing( 378 void BluetoothHostPairingController::AuthorizePairing(
374 device::BluetoothDevice* device) { 379 device::BluetoothDevice* device) {
375 // Disallow unknown device. 380 // Disallow unknown device.
376 device->RejectPairing(); 381 device->RejectPairing();
377 } 382 }
378 383
379 } // namespace pairing_chromeos 384 } // namespace pairing_chromeos
OLDNEW
« no previous file with comments | « components/pairing/bluetooth_host_pairing_controller.h ('k') | components/pairing/controller_pairing_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698