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

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

Issue 14651022: Merge 199048 "Bluetooth: Parse the bluez.Error.Failed on pairing..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1500/src/
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_device_experimental_chromeos.h" 5 #include "device/bluetooth/bluetooth_device_experimental_chromeos.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 << error_name << ": " << error_message; 675 << error_name << ": " << error_message;
676 VLOG(1) << object_path_.value() << ": " << num_connecting_calls_ 676 VLOG(1) << object_path_.value() << ": " << num_connecting_calls_
677 << " still in progress"; 677 << " still in progress";
678 678
679 UnregisterAgent(); 679 UnregisterAgent();
680 680
681 // Determine the error code from error_name. 681 // Determine the error code from error_name.
682 ConnectErrorCode error_code = ERROR_UNKNOWN; 682 ConnectErrorCode error_code = ERROR_UNKNOWN;
683 if (error_name == bluetooth_adapter::kErrorConnectionAttemptFailed) { 683 if (error_name == bluetooth_adapter::kErrorConnectionAttemptFailed) {
684 error_code = ERROR_FAILED; 684 error_code = ERROR_FAILED;
685 } else if (error_name == bluetooth_adapter::kErrorFailed) {
686 error_code = ERROR_FAILED;
685 } else if (error_name == bluetooth_adapter::kErrorAuthenticationFailed) { 687 } else if (error_name == bluetooth_adapter::kErrorAuthenticationFailed) {
686 error_code = ERROR_AUTH_FAILED; 688 error_code = ERROR_AUTH_FAILED;
687 } else if (error_name == bluetooth_adapter::kErrorAuthenticationCanceled) { 689 } else if (error_name == bluetooth_adapter::kErrorAuthenticationCanceled) {
688 error_code = ERROR_AUTH_CANCELED; 690 error_code = ERROR_AUTH_CANCELED;
689 } else if (error_name == bluetooth_adapter::kErrorAuthenticationRejected) { 691 } else if (error_name == bluetooth_adapter::kErrorAuthenticationRejected) {
690 error_code = ERROR_AUTH_REJECTED; 692 error_code = ERROR_AUTH_REJECTED;
691 } else if (error_name == bluetooth_adapter::kErrorAuthenticationTimeout) { 693 } else if (error_name == bluetooth_adapter::kErrorAuthenticationTimeout) {
692 error_code = ERROR_AUTH_TIMEOUT; 694 error_code = ERROR_AUTH_TIMEOUT;
693 } 695 }
694 696
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 if (!confirmation_callback_.is_null()) { 800 if (!confirmation_callback_.is_null()) {
799 confirmation_callback_.Run(status); 801 confirmation_callback_.Run(status);
800 confirmation_callback_.Reset(); 802 confirmation_callback_.Reset();
801 callback_run = true; 803 callback_run = true;
802 } 804 }
803 805
804 return callback_run; 806 return callback_run;
805 } 807 }
806 808
807 } // namespace chromeos 809 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_bluetooth_device_client.cc ('k') | device/bluetooth/bluetooth_experimental_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698