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

Side by Side Diff: extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc

Issue 2336843002: Decompose //extensions/browser/BUILD.gn (Closed)
Patch Set: win fix Created 4 years, 3 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 "extensions/browser/api/bluetooth_socket/bluetooth_socket_api.h" 5 #include "extensions/browser/api/bluetooth_socket/bluetooth_socket_api.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 } 599 }
600 600
601 void BluetoothSocketSendFunction::AsyncWorkStart() { 601 void BluetoothSocketSendFunction::AsyncWorkStart() {
602 DCHECK_CURRENTLY_ON(work_thread_id()); 602 DCHECK_CURRENTLY_ON(work_thread_id());
603 BluetoothApiSocket* socket = GetSocket(params_->socket_id); 603 BluetoothApiSocket* socket = GetSocket(params_->socket_id);
604 if (!socket) { 604 if (!socket) {
605 error_ = kSocketNotFoundError; 605 error_ = kSocketNotFoundError;
606 return; 606 return;
607 } 607 }
608 608
609 socket->Send(io_buffer_, 609 socket->Send(io_buffer_, static_cast<int>(io_buffer_size_),
Devlin 2016/09/13 17:10:49 ? This seems orthogonal to this CL.
Rahul Chaturvedi 2016/09/13 20:33:49 So these are actually real build errors - which fo
610 io_buffer_size_,
611 base::Bind(&BluetoothSocketSendFunction::OnSuccess, this), 610 base::Bind(&BluetoothSocketSendFunction::OnSuccess, this),
612 base::Bind(&BluetoothSocketSendFunction::OnError, this)); 611 base::Bind(&BluetoothSocketSendFunction::OnError, this));
613 } 612 }
614 613
615 void BluetoothSocketSendFunction::OnSuccess(int bytes_sent) { 614 void BluetoothSocketSendFunction::OnSuccess(int bytes_sent) {
616 DCHECK_CURRENTLY_ON(work_thread_id()); 615 DCHECK_CURRENTLY_ON(work_thread_id());
617 results_ = bluetooth_socket::Send::Results::Create(bytes_sent); 616 results_ = bluetooth_socket::Send::Results::Create(bytes_sent);
618 AsyncWorkCompleted(); 617 AsyncWorkCompleted();
619 } 618 }
620 619
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 if (socket) { 661 if (socket) {
663 socket_infos.push_back(CreateSocketInfo(socket_id, socket)); 662 socket_infos.push_back(CreateSocketInfo(socket_id, socket));
664 } 663 }
665 } 664 }
666 } 665 }
667 results_ = bluetooth_socket::GetSockets::Results::Create(socket_infos); 666 results_ = bluetooth_socket::GetSockets::Results::Create(socket_infos);
668 } 667 }
669 668
670 } // namespace api 669 } // namespace api
671 } // namespace extensions 670 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698