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

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

Issue 13872017: Bluetooth: gather usage metrics (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase: patch was applying badly on HEAD and failing on trybots Created 7 years, 8 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 "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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 properties->paired.ReplaceValue(true); 155 properties->paired.ReplaceValue(true);
156 properties->trusted.ReplaceValue(true); 156 properties->trusted.ReplaceValue(true);
157 properties->adapter.ReplaceValue( 157 properties->adapter.ReplaceValue(
158 dbus::ObjectPath(FakeBluetoothAdapterClient::kAdapterPath)); 158 dbus::ObjectPath(FakeBluetoothAdapterClient::kAdapterPath));
159 159
160 std::vector<std::string> uuids; 160 std::vector<std::string> uuids;
161 uuids.push_back("00001800-0000-1000-8000-00805f9b34fb"); 161 uuids.push_back("00001800-0000-1000-8000-00805f9b34fb");
162 uuids.push_back("00001801-0000-1000-8000-00805f9b34fb"); 162 uuids.push_back("00001801-0000-1000-8000-00805f9b34fb");
163 properties->uuids.ReplaceValue(uuids); 163 properties->uuids.ReplaceValue(uuids);
164 164
165 properties->modalias.ReplaceValue("usb:v05ACp030Dd0306");
166
165 properties_map_[dbus::ObjectPath(kPairedDevicePath)] = properties; 167 properties_map_[dbus::ObjectPath(kPairedDevicePath)] = properties;
166 device_list_.push_back(dbus::ObjectPath(kPairedDevicePath)); 168 device_list_.push_back(dbus::ObjectPath(kPairedDevicePath));
167 } 169 }
168 170
169 FakeBluetoothDeviceClient::~FakeBluetoothDeviceClient() { 171 FakeBluetoothDeviceClient::~FakeBluetoothDeviceClient() {
170 // Clean up Properties structures 172 // Clean up Properties structures
171 STLDeleteValues(&properties_map_); 173 STLDeleteValues(&properties_map_);
172 } 174 }
173 175
174 void FakeBluetoothDeviceClient::AddObserver(Observer* observer) { 176 void FakeBluetoothDeviceClient::AddObserver(Observer* observer) {
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 FROM_HERE, 834 FROM_HERE,
833 base::Bind(&FakeBluetoothDeviceClient::CompleteSimulatedPairing, 835 base::Bind(&FakeBluetoothDeviceClient::CompleteSimulatedPairing,
834 base::Unretained(this), 836 base::Unretained(this),
835 object_path, callback, error_callback), 837 object_path, callback, error_callback),
836 base::TimeDelta::FromMilliseconds(simulation_interval_ms_)); 838 base::TimeDelta::FromMilliseconds(simulation_interval_ms_));
837 839
838 } 840 }
839 } 841 }
840 842
841 } // namespace chromeos 843 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698