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

Side by Side Diff: base/sync_socket.h

Issue 6747014: Base: Last set of files to use BASE_API (for base.dll) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef BASE_SYNC_SOCKET_H_ 5 #ifndef BASE_SYNC_SOCKET_H_
6 #define BASE_SYNC_SOCKET_H_ 6 #define BASE_SYNC_SOCKET_H_
7 #pragma once 7 #pragma once
8 8
9 // A socket abstraction used for sending and receiving plain 9 // A socket abstraction used for sending and receiving plain
10 // data. Because they are blocking, they can be used to perform 10 // data. Because they are blocking, they can be used to perform
11 // rudimentary cross-process synchronization with low latency. 11 // rudimentary cross-process synchronization with low latency.
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #if defined(OS_WIN) 14 #if defined(OS_WIN)
15 #include <windows.h> 15 #include <windows.h>
16 #endif 16 #endif
17 #include <sys/types.h> 17 #include <sys/types.h>
18 18
19 #include "base/base_api.h"
20
19 namespace base { 21 namespace base {
20 22
21 class SyncSocket { 23 class BASE_API SyncSocket {
22 public: 24 public:
23 #if defined(OS_WIN) 25 #if defined(OS_WIN)
24 typedef HANDLE Handle; 26 typedef HANDLE Handle;
25 #else 27 #else
26 typedef int Handle; 28 typedef int Handle;
27 #endif 29 #endif
28 30
29 // Creates a SyncSocket from a Handle. Used in transport. 31 // Creates a SyncSocket from a Handle. Used in transport.
30 explicit SyncSocket(Handle handle) : handle_(handle) { } 32 explicit SyncSocket(Handle handle) : handle_(handle) { }
31 ~SyncSocket() { Close(); } 33 ~SyncSocket() { Close(); }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 66
65 private: 67 private:
66 Handle handle_; 68 Handle handle_;
67 69
68 DISALLOW_COPY_AND_ASSIGN(SyncSocket); 70 DISALLOW_COPY_AND_ASSIGN(SyncSocket);
69 }; 71 };
70 72
71 } // namespace base 73 } // namespace base
72 74
73 #endif // BASE_SYNC_SOCKET_H_ 75 #endif // BASE_SYNC_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698