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

Side by Side Diff: base/sync_socket_win.cc

Issue 15480004: moving SyncSocket's kInvalidHandle constant (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix linkage Created 7 years, 7 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 | « base/sync_socket.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/win/scoped_handle.h" 8 #include "base/win/scoped_handle.h"
9 9
10 namespace base { 10 namespace base {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Quit the operation if we can't write/read anymore. 161 // Quit the operation if we can't write/read anymore.
162 if (len != chunk) 162 if (len != chunk)
163 break; 163 break;
164 } 164 }
165 165
166 return (count > 0) ? count : 0; 166 return (count > 0) ? count : 0;
167 } 167 }
168 168
169 } // namespace 169 } // namespace
170 170
171 #if defined(COMPONENT_BUILD)
171 const SyncSocket::Handle SyncSocket::kInvalidHandle = INVALID_HANDLE_VALUE; 172 const SyncSocket::Handle SyncSocket::kInvalidHandle = INVALID_HANDLE_VALUE;
173 #endif
172 174
173 SyncSocket::SyncSocket() : handle_(kInvalidHandle) {} 175 SyncSocket::SyncSocket() : handle_(kInvalidHandle) {}
174 176
175 SyncSocket::~SyncSocket() { 177 SyncSocket::~SyncSocket() {
176 Close(); 178 Close();
177 } 179 }
178 180
179 // static 181 // static
180 bool SyncSocket::CreatePair(SyncSocket* socket_a, SyncSocket* socket_b) { 182 bool SyncSocket::CreatePair(SyncSocket* socket_a, SyncSocket* socket_b) {
181 return CreatePairImpl(&socket_a->handle_, &socket_b->handle_, false); 183 return CreatePairImpl(&socket_a->handle_, &socket_b->handle_, false);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } 264 }
263 265
264 // static 266 // static
265 bool CancelableSyncSocket::CreatePair(CancelableSyncSocket* socket_a, 267 bool CancelableSyncSocket::CreatePair(CancelableSyncSocket* socket_a,
266 CancelableSyncSocket* socket_b) { 268 CancelableSyncSocket* socket_b) {
267 return CreatePairImpl(&socket_a->handle_, &socket_b->handle_, true); 269 return CreatePairImpl(&socket_a->handle_, &socket_b->handle_, true);
268 } 270 }
269 271
270 272
271 } // namespace base 273 } // namespace base
OLDNEW
« no previous file with comments | « base/sync_socket.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698