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

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

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_gatt_characteristic_service_provider.h" 5 #include "chromeos/dbus/fake_bluetooth_gatt_characteristic_service_provider.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "chromeos/dbus/dbus_thread_manager.h" 9 #include "chromeos/dbus/dbus_thread_manager.h"
10 #include "chromeos/dbus/fake_bluetooth_gatt_manager_client.h" 10 #include "chromeos/dbus/fake_bluetooth_gatt_manager_client.h"
(...skipping 11 matching lines...) Expand all
22 : object_path_(object_path), 22 : object_path_(object_path),
23 uuid_(uuid), 23 uuid_(uuid),
24 service_path_(service_path), 24 service_path_(service_path),
25 delegate_(delegate) { 25 delegate_(delegate) {
26 VLOG(1) << "Creating Bluetooth GATT characteristic: " << object_path_.value(); 26 VLOG(1) << "Creating Bluetooth GATT characteristic: " << object_path_.value();
27 27
28 DCHECK(object_path_.IsValid()); 28 DCHECK(object_path_.IsValid());
29 DCHECK(service_path_.IsValid()); 29 DCHECK(service_path_.IsValid());
30 DCHECK(!uuid.empty()); 30 DCHECK(!uuid.empty());
31 DCHECK(delegate_); 31 DCHECK(delegate_);
32 DCHECK(base::StartsWithASCII(object_path_.value(), 32 DCHECK(base::StartsWith(object_path_.value(),
33 service_path_.value() + "/", true)); 33 service_path_.value() + "/",
34 base::CompareCase::SENSITIVE));
34 35
35 // TODO(armansito): Do something with |flags| and |permissions|. 36 // TODO(armansito): Do something with |flags| and |permissions|.
36 37
37 FakeBluetoothGattManagerClient* fake_bluetooth_gatt_manager_client = 38 FakeBluetoothGattManagerClient* fake_bluetooth_gatt_manager_client =
38 static_cast<FakeBluetoothGattManagerClient*>( 39 static_cast<FakeBluetoothGattManagerClient*>(
39 DBusThreadManager::Get()->GetBluetoothGattManagerClient()); 40 DBusThreadManager::Get()->GetBluetoothGattManagerClient());
40 fake_bluetooth_gatt_manager_client-> 41 fake_bluetooth_gatt_manager_client->
41 RegisterCharacteristicServiceProvider(this); 42 RegisterCharacteristicServiceProvider(this);
42 } 43 }
43 44
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 error_callback.Run(); 97 error_callback.Run();
97 return; 98 return;
98 } 99 }
99 100
100 // Pass on to the delegate. 101 // Pass on to the delegate.
101 DCHECK(delegate_); 102 DCHECK(delegate_);
102 delegate_->SetCharacteristicValue(value, callback, error_callback); 103 delegate_->SetCharacteristicValue(value, callback, error_callback);
103 } 104 }
104 105
105 } // namespace chromeos 106 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698