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

Side by Side Diff: runtime/bin/utils.h

Issue 10916081: Add secure sockets to dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add Socket.read and pass port number to NSS. Created 8 years, 1 month 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_UTILS_H_ 5 #ifndef BIN_UTILS_H_
6 #define BIN_UTILS_H_ 6 #define BIN_UTILS_H_
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
11 #include "include/dart_api.h" 11 #include "include/dart_api.h"
12 #include "platform/globals.h" 12 #include "platform/globals.h"
13 13
14 class OSError { 14 class OSError {
15 public: 15 public:
16 enum SubSystem { 16 enum SubSystem {
17 kSystem, 17 kSystem,
18 kGetAddressInfo, 18 kGetAddressInfo,
19 kNSS,
19 kUnknown = -1 20 kUnknown = -1
20 }; 21 };
21 22
22 OSError(); 23 OSError();
23 OSError(int code, const char* message, SubSystem sub_system) { 24 OSError(int code, const char* message, SubSystem sub_system) {
24 sub_system_ = sub_system; 25 sub_system_ = sub_system;
25 code_ = code; 26 code_ = code;
26 message_ = NULL; // SetMessage will free existing message. 27 message_ = NULL; // SetMessage will free existing message.
27 SetMessage(message); 28 SetMessage(message);
28 } 29 }
(...skipping 17 matching lines...) Expand all
46 } 47 }
47 48
48 SubSystem sub_system_; 49 SubSystem sub_system_;
49 int code_; 50 int code_;
50 char* message_; 51 char* message_;
51 52
52 DISALLOW_COPY_AND_ASSIGN(OSError); 53 DISALLOW_COPY_AND_ASSIGN(OSError);
53 }; 54 };
54 55
55 #endif // BIN_UTILS_H_ 56 #endif // BIN_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698