| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 } | 167 } |
| 168 NSHTTPURLResponse* http_response = | 168 NSHTTPURLResponse* http_response = |
| 169 base::mac::ObjCCast<NSHTTPURLResponse>(response); | 169 base::mac::ObjCCast<NSHTTPURLResponse>(response); |
| 170 if (!http_response) { | 170 if (!http_response) { |
| 171 LOG(ERROR) << "no http_response"; | 171 LOG(ERROR) << "no http_response"; |
| 172 return false; | 172 return false; |
| 173 } | 173 } |
| 174 NSInteger http_status = [http_response statusCode]; | 174 NSInteger http_status = [http_response statusCode]; |
| 175 if (http_status != 200) { | 175 if (http_status != 200) { |
| 176 LOG(ERROR) << base::StringPrintf("HTTP status %ld", | 176 LOG(ERROR) << base::StringPrintf("HTTP status %ld", |
| 177 static_cast<long>(http_status)); | 177 implicit_cast<long>(http_status)); |
| 178 return false; | 178 return false; |
| 179 } | 179 } |
| 180 | 180 |
| 181 return true; | 181 return true; |
| 182 } | 182 } |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace | 185 } // namespace |
| 186 | 186 |
| 187 // static | 187 // static |
| 188 scoped_ptr<HTTPTransport> HTTPTransport::Create() { | 188 scoped_ptr<HTTPTransport> HTTPTransport::Create() { |
| 189 return scoped_ptr<HTTPTransport>(new HTTPTransportMac()); | 189 return scoped_ptr<HTTPTransport>(new HTTPTransportMac()); |
| 190 } | 190 } |
| 191 | 191 |
| 192 } // namespace crashpad | 192 } // namespace crashpad |
| OLD | NEW |