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

Side by Side Diff: dart/runtime/bin/secure_socket.cc

Issue 207413003: Modify secure_socket.cc to use new NSS memio api. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 6 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
« no previous file with comments | « no previous file | 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 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 #include "bin/secure_socket.h" 5 #include "bin/secure_socket.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 string_start_ = Dart_NewPersistentHandle(DartUtils::NewString("start")); 437 string_start_ = Dart_NewPersistentHandle(DartUtils::NewString("start"));
438 ASSERT(string_start_ != NULL); 438 ASSERT(string_start_ != NULL);
439 ASSERT(string_length_ == NULL); 439 ASSERT(string_length_ == NULL);
440 string_length_ = Dart_NewPersistentHandle(DartUtils::NewString("length")); 440 string_length_ = Dart_NewPersistentHandle(DartUtils::NewString("length"));
441 ASSERT(string_length_ != NULL); 441 ASSERT(string_length_ != NULL);
442 ASSERT(bad_certificate_callback_ == NULL); 442 ASSERT(bad_certificate_callback_ == NULL);
443 bad_certificate_callback_ = Dart_NewPersistentHandle(Dart_Null()); 443 bad_certificate_callback_ = Dart_NewPersistentHandle(Dart_Null());
444 ASSERT(bad_certificate_callback_ != NULL); 444 ASSERT(bad_certificate_callback_ != NULL);
445 445
446 InitializeBuffers(dart_this); 446 InitializeBuffers(dart_this);
447 filter_ = memio_CreateIOLayer(kMemioBufferSize); 447 filter_ = memio_CreateIOLayer(kMemioBufferSize, kMemioBufferSize);
448 } 448 }
449 449
450 450
451 void SSLFilter::InitializeBuffers(Dart_Handle dart_this) { 451 void SSLFilter::InitializeBuffers(Dart_Handle dart_this) {
452 // Create SSLFilter buffers as ExternalUint8Array objects. 452 // Create SSLFilter buffers as ExternalUint8Array objects.
453 Dart_Handle dart_buffers_object = ThrowIfError( 453 Dart_Handle dart_buffers_object = ThrowIfError(
454 Dart_GetField(dart_this, DartUtils::NewString("buffers"))); 454 Dart_GetField(dart_this, DartUtils::NewString("buffers")));
455 Dart_Handle secure_filter_impl_type = 455 Dart_Handle secure_filter_impl_type =
456 Dart_InstanceGetType(dart_this); 456 Dart_InstanceGetType(dart_this);
457 Dart_Handle dart_buffer_size = ThrowIfError( 457 Dart_Handle dart_buffer_size = ThrowIfError(
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 } 956 }
957 if (bytes_processed > 0) { 957 if (bytes_processed > 0) {
958 memio_PutWriteResult(secret, bytes_processed); 958 memio_PutWriteResult(secret, bytes_processed);
959 } 959 }
960 } 960 }
961 return bytes_processed; 961 return bytes_processed;
962 } 962 }
963 963
964 } // namespace bin 964 } // namespace bin
965 } // namespace dart 965 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698