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

Side by Side Diff: content/browser/bluetooth/bluetooth_dispatcher_host.cc

Issue 1403723004: bluetooth: Implement BluetoothCharacteristicProperties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-query-cache
Patch Set: Address scheib's comments Created 5 years, 2 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
« no previous file with comments | « no previous file | content/common/bluetooth/bluetooth_messages.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 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 // ID Not In Map Note: 5 // ID Not In Map Note:
6 // A service, characteristic, or descriptor ID not in the corresponding 6 // A service, characteristic, or descriptor ID not in the corresponding
7 // BluetoothDispatcherHost map [service_to_device_, characteristic_to_service_, 7 // BluetoothDispatcherHost map [service_to_device_, characteristic_to_service_,
8 // descriptor_to_characteristic_] implies a hostile renderer because a renderer 8 // descriptor_to_characteristic_] implies a hostile renderer because a renderer
9 // obtains the corresponding ID from this class and it will be added to the map 9 // obtains the corresponding ID from this class and it will be added to the map
10 // at that time. 10 // at that time.
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 make_pair(characteristic_instance_id, service_instance_id)); 617 make_pair(characteristic_instance_id, service_instance_id));
618 618
619 // If value is already in map, DCHECK it's valid. 619 // If value is already in map, DCHECK it's valid.
620 if (!insert_result.second) 620 if (!insert_result.second)
621 DCHECK(insert_result.first->second == service_instance_id); 621 DCHECK(insert_result.first->second == service_instance_id);
622 622
623 RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome::SUCCESS); 623 RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome::SUCCESS);
624 // TODO(ortuno): Use generated instance ID instead. 624 // TODO(ortuno): Use generated instance ID instead.
625 // https://crbug.com/495379 625 // https://crbug.com/495379
626 Send(new BluetoothMsg_GetCharacteristicSuccess( 626 Send(new BluetoothMsg_GetCharacteristicSuccess(
627 thread_id, request_id, characteristic_instance_id)); 627 thread_id, request_id, characteristic_instance_id,
628 static_cast<uint32>(characteristic->GetProperties())));
628 return; 629 return;
629 } 630 }
630 } 631 }
631 RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome::NOT_FOUND); 632 RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome::NOT_FOUND);
632 Send(new BluetoothMsg_GetCharacteristicError( 633 Send(new BluetoothMsg_GetCharacteristicError(
633 thread_id, request_id, WebBluetoothError::CharacteristicNotFound)); 634 thread_id, request_id, WebBluetoothError::CharacteristicNotFound));
634 } 635 }
635 636
636 void BluetoothDispatcherHost::OnReadValue( 637 void BluetoothDispatcherHost::OnReadValue(
637 int thread_id, 638 int thread_id,
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1136 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1136 NOTIMPLEMENTED(); 1137 NOTIMPLEMENTED();
1137 } 1138 }
1138 1139
1139 void BluetoothDispatcherHost::ShowBluetoothAdapterOffLink() { 1140 void BluetoothDispatcherHost::ShowBluetoothAdapterOffLink() {
1140 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1141 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1141 NOTIMPLEMENTED(); 1142 NOTIMPLEMENTED();
1142 } 1143 }
1143 1144
1144 } // namespace content 1145 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/bluetooth/bluetooth_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698