OLD | NEW |
---|---|
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
86 UInt8* buffer, | 86 UInt8* buffer, |
87 CFIndex buffer_length, | 87 CFIndex buffer_length, |
88 CFStreamError* error, | 88 CFStreamError* error, |
89 Boolean* at_eof, | 89 Boolean* at_eof, |
90 void* info) { | 90 void* info) { |
91 if (buffer_length == 0) { | 91 if (buffer_length == 0) { |
92 *at_eof = FALSE; | 92 *at_eof = FALSE; |
93 return 0; | 93 return 0; |
94 } | 94 } |
95 | 95 |
96 ssize_t bytes_read = GetStream(info)->GetBytesBuffer(buffer, buffer_length); | 96 FileOperationResult bytes_read = |
Mark Mentovai
2015/10/22 22:56:18
file_io.h
scottmg
2015/10/22 23:13:40
Done.
| |
97 GetStream(info)->GetBytesBuffer(buffer, buffer_length); | |
97 if (bytes_read < 0) { | 98 if (bytes_read < 0) { |
98 error->error = -1; | 99 error->error = -1; |
99 error->domain = kCFStreamErrorDomainCustom; | 100 error->domain = kCFStreamErrorDomainCustom; |
100 } else { | 101 } else { |
101 *at_eof = bytes_read == 0; | 102 *at_eof = bytes_read == 0; |
102 } | 103 } |
103 | 104 |
104 return bytes_read; | 105 return bytes_read; |
105 } | 106 } |
106 | 107 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
223 } | 224 } |
224 | 225 |
225 } // namespace | 226 } // namespace |
226 | 227 |
227 // static | 228 // static |
228 scoped_ptr<HTTPTransport> HTTPTransport::Create() { | 229 scoped_ptr<HTTPTransport> HTTPTransport::Create() { |
229 return scoped_ptr<HTTPTransport>(new HTTPTransportMac()); | 230 return scoped_ptr<HTTPTransport>(new HTTPTransportMac()); |
230 } | 231 } |
231 | 232 |
232 } // namespace crashpad | 233 } // namespace crashpad |
OLD | NEW |