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

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

Issue 1336413003: In the .mm files use the crashpad::implicit_cast .. explicitly. (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 3 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
« util/mac/launchd.mm ('K') | « util/mac/launchd.mm ('k') | 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 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 NSHTTPURLResponse* http_response = 197 NSHTTPURLResponse* http_response =
198 base::mac::ObjCCast<NSHTTPURLResponse>(response); 198 base::mac::ObjCCast<NSHTTPURLResponse>(response);
199 if (!http_response) { 199 if (!http_response) {
200 LOG(ERROR) << "no http_response"; 200 LOG(ERROR) << "no http_response";
201 return false; 201 return false;
202 } 202 }
203 NSInteger http_status = [http_response statusCode]; 203 NSInteger http_status = [http_response statusCode];
204 if (http_status != 200) { 204 if (http_status != 200) {
205 LOG(ERROR) << base::StringPrintf("HTTP status %ld", 205 LOG(ERROR) << base::StringPrintf("HTTP status %ld",
206 implicit_cast<long>(http_status)); 206 crashpad::implicit_cast<long>(http_status ));
207 return false; 207 return false;
208 } 208 }
209 209
210 if (response_body) { 210 if (response_body) {
211 response_body->assign(static_cast<const char*>([body bytes]), 211 response_body->assign(static_cast<const char*>([body bytes]),
212 [body length]); 212 [body length]);
213 } 213 }
214 214
215 return true; 215 return true;
216 } 216 }
217 } 217 }
218 218
219 } // namespace 219 } // namespace
220 220
221 // static 221 // static
222 scoped_ptr<HTTPTransport> HTTPTransport::Create() { 222 scoped_ptr<HTTPTransport> HTTPTransport::Create() {
223 return scoped_ptr<HTTPTransport>(new HTTPTransportMac()); 223 return scoped_ptr<HTTPTransport>(new HTTPTransportMac());
224 } 224 }
225 225
226 } // namespace crashpad 226 } // namespace crashpad
OLDNEW
« util/mac/launchd.mm ('K') | « util/mac/launchd.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698