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

Side by Side Diff: util/net/http_transport_mac.mm

Issue 1416493006: Change file op |ssize_t|s to FileOperationResult (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . Created 5 years, 2 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698