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

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

Issue 18080010: Remove static mutexes/monitors from dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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
« no previous file with comments | « runtime/bin/process_win.cc ('k') | runtime/bin/secure_socket.cc » ('j') | 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 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_SECURE_SOCKET_H_ 5 #ifndef BIN_SECURE_SOCKET_H_
6 #define BIN_SECURE_SOCKET_H_ 6 #define BIN_SECURE_SOCKET_H_
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 static void InitializeLibrary(const char* certificate_database, 83 static void InitializeLibrary(const char* certificate_database,
84 const char* password, 84 const char* password,
85 bool use_builtin_root_certificates, 85 bool use_builtin_root_certificates,
86 bool report_duplicate_initialization = true); 86 bool report_duplicate_initialization = true);
87 static Dart_Port GetServicePort(); 87 static Dart_Port GetServicePort();
88 88
89 private: 89 private:
90 static const int kMemioBufferSize = 20 * KB; 90 static const int kMemioBufferSize = 20 * KB;
91 static bool library_initialized_; 91 static bool library_initialized_;
92 static const char* password_; 92 static const char* password_;
93 static dart::Mutex mutex_; // To protect library initialization. 93 static dart::Mutex* mutex_; // To protect library initialization.
94 static NativeService filter_service_; 94 static NativeService filter_service_;
95 95
96 uint8_t* buffers_[kNumBuffers]; 96 uint8_t* buffers_[kNumBuffers];
97 int buffer_size_; 97 int buffer_size_;
98 int encrypted_buffer_size_; 98 int encrypted_buffer_size_;
99 Dart_PersistentHandle string_start_; 99 Dart_PersistentHandle string_start_;
100 Dart_PersistentHandle string_length_; 100 Dart_PersistentHandle string_length_;
101 Dart_PersistentHandle dart_buffer_objects_[kNumBuffers]; 101 Dart_PersistentHandle dart_buffer_objects_[kNumBuffers];
102 Dart_PersistentHandle handshake_complete_; 102 Dart_PersistentHandle handshake_complete_;
103 Dart_PersistentHandle bad_certificate_callback_; 103 Dart_PersistentHandle bad_certificate_callback_;
104 bool in_handshake_; 104 bool in_handshake_;
105 bool is_server_; 105 bool is_server_;
106 char* client_certificate_name_; 106 char* client_certificate_name_;
107 PRFileDesc* filter_; 107 PRFileDesc* filter_;
108 108
109 static bool isBufferEncrypted(int i) { 109 static bool isBufferEncrypted(int i) {
110 return static_cast<BufferIndex>(i) >= kFirstEncrypted; 110 return static_cast<BufferIndex>(i) >= kFirstEncrypted;
111 } 111 }
112 void InitializeBuffers(Dart_Handle dart_this); 112 void InitializeBuffers(Dart_Handle dart_this);
113 void InitializePlatformData(); 113 void InitializePlatformData();
114 114
115 DISALLOW_COPY_AND_ASSIGN(SSLFilter); 115 DISALLOW_COPY_AND_ASSIGN(SSLFilter);
116 }; 116 };
117 117
118 } // namespace bin 118 } // namespace bin
119 } // namespace dart 119 } // namespace dart
120 120
121 #endif // BIN_SECURE_SOCKET_H_ 121 #endif // BIN_SECURE_SOCKET_H_
OLDNEW
« no previous file with comments | « runtime/bin/process_win.cc ('k') | runtime/bin/secure_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698