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

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

Issue 224893002: device/bluetooth: Rename device::bluetooth_utils::UUID to device::BluetoothUUID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « device/bluetooth/bluetooth_device.h ('k') | device/bluetooth/bluetooth_device_chromeos.h » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.h" 5 #include "device/bluetooth/bluetooth_device.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "device/bluetooth/bluetooth_utils.h"
11 #include "grit/device_bluetooth_strings.h" 10 #include "grit/device_bluetooth_strings.h"
12 #include "ui/base/l10n/l10n_util.h" 11 #include "ui/base/l10n/l10n_util.h"
13 12
14 namespace device { 13 namespace device {
15 14
16 // static
17 bool BluetoothDevice::IsUUIDValid(const std::string& uuid) {
18 return !bluetooth_utils::CanonicalUuid(uuid).empty();
19 }
20
21 BluetoothDevice::BluetoothDevice() { 15 BluetoothDevice::BluetoothDevice() {
22 } 16 }
23 17
24 BluetoothDevice::~BluetoothDevice() { 18 BluetoothDevice::~BluetoothDevice() {
25 } 19 }
26 20
27 base::string16 BluetoothDevice::GetName() const { 21 base::string16 BluetoothDevice::GetName() const {
28 std::string name = GetDeviceName(); 22 std::string name = GetDeviceName();
29 if (!name.empty()) { 23 if (!name.empty()) {
30 return base::UTF8ToUTF16(name); 24 return base::UTF8ToUTF16(name);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 if ((type == DEVICE_MOUSE && vendor == "00:12:A1") || 162 if ((type == DEVICE_MOUSE && vendor == "00:12:A1") ||
169 // Microsoft "Microsoft Bluetooth Notebook Mouse 5000", model X807028-001 163 // Microsoft "Microsoft Bluetooth Notebook Mouse 5000", model X807028-001
170 (type == DEVICE_MOUSE && vendor == "7C:ED:8D")) 164 (type == DEVICE_MOUSE && vendor == "7C:ED:8D"))
171 return false; 165 return false;
172 // TODO: Move this database into a config file. 166 // TODO: Move this database into a config file.
173 167
174 return true; 168 return true;
175 } 169 }
176 170
177 } // namespace device 171 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device.h ('k') | device/bluetooth/bluetooth_device_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698