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

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

Issue 102843002: Move RemoveChars, ReplaceChars, TrimString, and TruncateUTF8ToByteSize to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "device/bluetooth/bluetooth_profile_chromeos.h" 5 #include "device/bluetooth/bluetooth_profile_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 bluetooth_options.psm = options.psm; 83 bluetooth_options.psm = options.psm;
84 bluetooth_options.require_authentication = options.require_authentication; 84 bluetooth_options.require_authentication = options.require_authentication;
85 bluetooth_options.require_authorization = options.require_authorization; 85 bluetooth_options.require_authorization = options.require_authorization;
86 bluetooth_options.auto_connect = options.auto_connect; 86 bluetooth_options.auto_connect = options.auto_connect;
87 bluetooth_options.version = options.version; 87 bluetooth_options.version = options.version;
88 bluetooth_options.features = options.features; 88 bluetooth_options.features = options.features;
89 89
90 // The object path is relatively meaningless, but has to be unique, so we 90 // The object path is relatively meaningless, but has to be unique, so we
91 // use the UUID of the profile. 91 // use the UUID of the profile.
92 std::string uuid_path; 92 std::string uuid_path;
93 ReplaceChars(uuid, ":-", "_", &uuid_path); 93 base::ReplaceChars(uuid, ":-", "_", &uuid_path);
94 94
95 object_path_ = dbus::ObjectPath("/org/chromium/bluetooth_profile/" + 95 object_path_ = dbus::ObjectPath("/org/chromium/bluetooth_profile/" +
96 uuid_path); 96 uuid_path);
97 97
98 dbus::Bus* system_bus = DBusThreadManager::Get()->GetSystemBus(); 98 dbus::Bus* system_bus = DBusThreadManager::Get()->GetSystemBus();
99 profile_.reset(BluetoothProfileServiceProvider::Create( 99 profile_.reset(BluetoothProfileServiceProvider::Create(
100 system_bus, object_path_, this)); 100 system_bus, object_path_, this));
101 DCHECK(profile_.get()); 101 DCHECK(profile_.get());
102 102
103 VLOG(1) << object_path_.value() << ": Register profile"; 103 VLOG(1) << object_path_.value() << ": Register profile";
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 static_cast<BluetoothAdapterChromeOS*>(adapter.get())-> 244 static_cast<BluetoothAdapterChromeOS*>(adapter.get())->
245 GetDeviceWithPath(device_path); 245 GetDeviceWithPath(device_path);
246 DCHECK(device); 246 DCHECK(device);
247 247
248 scoped_refptr<BluetoothSocket> socket(( 248 scoped_refptr<BluetoothSocket> socket((
249 BluetoothSocketChromeOS::Create(fd.get()))); 249 BluetoothSocketChromeOS::Create(fd.get())));
250 connection_callback_.Run(device, socket); 250 connection_callback_.Run(device, socket);
251 } 251 }
252 252
253 } // namespace chromeos 253 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698