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

Side by Side Diff: chromeos/dbus/fake_bluetooth_device_client.cc

Issue 14842004: Bluetooth: reset pairing canceled flag in fake (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromeos/dbus/fake_bluetooth_device_client.h" 5 #include "chromeos/dbus/fake_bluetooth_device_client.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 const ErrorCallback& error_callback) { 277 const ErrorCallback& error_callback) {
278 VLOG(1) << "Pair: " << object_path.value(); 278 VLOG(1) << "Pair: " << object_path.value();
279 Properties* properties = GetProperties(object_path); 279 Properties* properties = GetProperties(object_path);
280 280
281 if (properties->paired.value() == true) { 281 if (properties->paired.value() == true) {
282 // Already paired. 282 // Already paired.
283 callback.Run(); 283 callback.Run();
284 return; 284 return;
285 } 285 }
286 286
287 pairing_cancelled_ = false;
288
287 FakeBluetoothAgentManagerClient* fake_bluetooth_agent_manager_client = 289 FakeBluetoothAgentManagerClient* fake_bluetooth_agent_manager_client =
288 static_cast<FakeBluetoothAgentManagerClient*>( 290 static_cast<FakeBluetoothAgentManagerClient*>(
289 DBusThreadManager::Get()-> 291 DBusThreadManager::Get()->
290 GetExperimentalBluetoothAgentManagerClient()); 292 GetExperimentalBluetoothAgentManagerClient());
291 FakeBluetoothAgentServiceProvider* agent_service_provider = 293 FakeBluetoothAgentServiceProvider* agent_service_provider =
292 fake_bluetooth_agent_manager_client->GetAgentServiceProvider(); 294 fake_bluetooth_agent_manager_client->GetAgentServiceProvider();
293 if (agent_service_provider == NULL) { 295 if (agent_service_provider == NULL) {
294 error_callback.Run(kNoResponseError, "Missing agent"); 296 error_callback.Run(kNoResponseError, "Missing agent");
295 return; 297 return;
296 } 298 }
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 FROM_HERE, 868 FROM_HERE,
867 base::Bind(&FakeBluetoothDeviceClient::CompleteSimulatedPairing, 869 base::Bind(&FakeBluetoothDeviceClient::CompleteSimulatedPairing,
868 base::Unretained(this), 870 base::Unretained(this),
869 object_path, callback, error_callback), 871 object_path, callback, error_callback),
870 base::TimeDelta::FromMilliseconds(simulation_interval_ms_)); 872 base::TimeDelta::FromMilliseconds(simulation_interval_ms_));
871 873
872 } 874 }
873 } 875 }
874 876
875 } // namespace chromeos 877 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698