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

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

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

Powered by Google App Engine
This is Rietveld 408576698