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

Side by Side Diff: base/sync_socket_nacl.cc

Issue 2809673002: Fix double close in MojoAudioOutputStream. (Closed)
Patch Set: Fix Win complie. Created 3 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
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 "base/sync_socket.h" 5 #include "base/sync_socket.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <limits.h> 8 #include <limits.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 size_t SyncSocket::ReceiveWithTimeout(void* buffer, size_t length, TimeDelta) { 68 size_t SyncSocket::ReceiveWithTimeout(void* buffer, size_t length, TimeDelta) {
69 NOTIMPLEMENTED(); 69 NOTIMPLEMENTED();
70 return 0; 70 return 0;
71 } 71 }
72 72
73 size_t SyncSocket::Peek() { 73 size_t SyncSocket::Peek() {
74 NOTIMPLEMENTED(); 74 NOTIMPLEMENTED();
75 return 0; 75 return 0;
76 } 76 }
77 77
78 SyncSocket::Handle SyncSocket::Release() {
79 Handle r = handle_;
80 handle_ = kInvalidHandle;
81 return r;
82 }
83
78 CancelableSyncSocket::CancelableSyncSocket() { 84 CancelableSyncSocket::CancelableSyncSocket() {
79 } 85 }
80 86
81 CancelableSyncSocket::CancelableSyncSocket(Handle handle) 87 CancelableSyncSocket::CancelableSyncSocket(Handle handle)
82 : SyncSocket(handle) { 88 : SyncSocket(handle) {
83 } 89 }
84 90
85 size_t CancelableSyncSocket::Send(const void* buffer, size_t length) { 91 size_t CancelableSyncSocket::Send(const void* buffer, size_t length) {
86 return SyncSocket::Send(buffer, length); 92 return SyncSocket::Send(buffer, length);
87 } 93 }
88 94
89 bool CancelableSyncSocket::Shutdown() { 95 bool CancelableSyncSocket::Shutdown() {
90 return SyncSocket::Close(); 96 return SyncSocket::Close();
91 } 97 }
92 98
93 // static 99 // static
94 bool CancelableSyncSocket::CreatePair(CancelableSyncSocket* socket_a, 100 bool CancelableSyncSocket::CreatePair(CancelableSyncSocket* socket_a,
95 CancelableSyncSocket* socket_b) { 101 CancelableSyncSocket* socket_b) {
96 return SyncSocket::CreatePair(socket_a, socket_b); 102 return SyncSocket::CreatePair(socket_a, socket_b);
97 } 103 }
98 104
99 } // namespace base 105 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698