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

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

Issue 2888033002: Devices shoule not be found by Android enrollment app after successful enrollment. (Closed)
Patch Set: Add UUID as filter when detecting devices. Created 3 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 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 #ifndef COMPONENTS_PAIRING_BLUETOOTH_HOST_PAIRING_CONTROLLER_H_ 5 #ifndef COMPONENTS_PAIRING_BLUETOOTH_HOST_PAIRING_CONTROLLER_H_
6 #define COMPONENTS_PAIRING_BLUETOOTH_HOST_PAIRING_CONTROLLER_H_ 6 #define COMPONENTS_PAIRING_BLUETOOTH_HOST_PAIRING_CONTROLLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void SetDelegateForTesting(TestDelegate* delegate); 69 void SetDelegateForTesting(TestDelegate* delegate);
70 scoped_refptr<device::BluetoothAdapter> GetAdapterForTesting(); 70 scoped_refptr<device::BluetoothAdapter> GetAdapterForTesting();
71 71
72 private: 72 private:
73 friend class chromeos::BluetoothHostPairingNoInputTest; 73 friend class chromeos::BluetoothHostPairingNoInputTest;
74 74
75 void ChangeStage(Stage new_stage); 75 void ChangeStage(Stage new_stage);
76 void SendHostStatus(); 76 void SendHostStatus();
77 77
78 void OnGetAdapter(scoped_refptr<device::BluetoothAdapter> adapter); 78 void OnGetAdapter(scoped_refptr<device::BluetoothAdapter> adapter);
79 void SetName(); 79 void SetPowered();
80 void OnSetName();
81 void OnSetPowered(); 80 void OnSetPowered();
82 void OnCreateService(scoped_refptr<device::BluetoothSocket> socket); 81 void OnCreateService(scoped_refptr<device::BluetoothSocket> socket);
83 void OnSetDiscoverable(bool change_stage); 82 void OnSetDiscoverable(bool change_stage);
84 void OnAccept(const device::BluetoothDevice* device, 83 void OnAccept(const device::BluetoothDevice* device,
85 scoped_refptr<device::BluetoothSocket> socket); 84 scoped_refptr<device::BluetoothSocket> socket);
86 void OnSendComplete(int bytes_sent); 85 void OnSendComplete(int bytes_sent);
87 void OnReceiveComplete(int bytes, scoped_refptr<net::IOBuffer> io_buffer); 86 void OnReceiveComplete(int bytes, scoped_refptr<net::IOBuffer> io_buffer);
88 87
89 void OnCreateServiceError(const std::string& message); 88 void OnCreateServiceError(const std::string& message);
90 void OnSetError(); 89 void OnSetError();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void DisplayPinCode(device::BluetoothDevice* device, 131 void DisplayPinCode(device::BluetoothDevice* device,
133 const std::string& pincode) override; 132 const std::string& pincode) override;
134 void DisplayPasskey(device::BluetoothDevice* device, 133 void DisplayPasskey(device::BluetoothDevice* device,
135 uint32_t passkey) override; 134 uint32_t passkey) override;
136 void KeysEntered(device::BluetoothDevice* device, uint32_t entered) override; 135 void KeysEntered(device::BluetoothDevice* device, uint32_t entered) override;
137 void ConfirmPasskey(device::BluetoothDevice* device, 136 void ConfirmPasskey(device::BluetoothDevice* device,
138 uint32_t passkey) override; 137 uint32_t passkey) override;
139 void AuthorizePairing(device::BluetoothDevice* device) override; 138 void AuthorizePairing(device::BluetoothDevice* device) override;
140 139
141 Stage current_stage_; 140 Stage current_stage_;
142 std::string device_name_;
143 std::string confirmation_code_; 141 std::string confirmation_code_;
144 std::string enrollment_domain_; 142 std::string enrollment_domain_;
145 Connectivity connectivity_status_; 143 Connectivity connectivity_status_;
146 UpdateStatus update_status_; 144 UpdateStatus update_status_;
147 EnrollmentStatus enrollment_status_; 145 EnrollmentStatus enrollment_status_;
148 std::string permanent_id_; 146 std::string permanent_id_;
149 std::string controller_device_address_; 147 std::string controller_device_address_;
150 bool was_powered_ = false; 148 bool was_powered_ = false;
151 149
152 scoped_refptr<device::BluetoothAdapter> adapter_; 150 scoped_refptr<device::BluetoothAdapter> adapter_;
153 scoped_refptr<device::BluetoothSocket> service_socket_; 151 scoped_refptr<device::BluetoothSocket> service_socket_;
154 scoped_refptr<device::BluetoothSocket> controller_socket_; 152 scoped_refptr<device::BluetoothSocket> controller_socket_;
155 std::unique_ptr<ProtoDecoder> proto_decoder_; 153 std::unique_ptr<ProtoDecoder> proto_decoder_;
156 TestDelegate* delegate_ = nullptr; 154 TestDelegate* delegate_ = nullptr;
157 155
158 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; 156 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
159 base::ThreadChecker thread_checker_; 157 base::ThreadChecker thread_checker_;
160 base::ObserverList<Observer> observers_; 158 base::ObserverList<Observer> observers_;
161 base::WeakPtrFactory<BluetoothHostPairingController> ptr_factory_; 159 base::WeakPtrFactory<BluetoothHostPairingController> ptr_factory_;
162 160
163 DISALLOW_COPY_AND_ASSIGN(BluetoothHostPairingController); 161 DISALLOW_COPY_AND_ASSIGN(BluetoothHostPairingController);
164 }; 162 };
165 163
166 } // namespace pairing_chromeos 164 } // namespace pairing_chromeos
167 165
168 #endif // COMPONENTS_PAIRING_BLUETOOTH_HOST_PAIRING_CONTROLLER_H_ 166 #endif // COMPONENTS_PAIRING_BLUETOOTH_HOST_PAIRING_CONTROLLER_H_
OLDNEW
« no previous file with comments | « components/pairing/bluetooth_controller_pairing_controller.cc ('k') | components/pairing/bluetooth_host_pairing_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698