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

Side by Side Diff: src/common/mac/HTTPMultipartUpload.m

Issue 1171693007: Use local variable for out parameter rather than direct use of ivar (Closed) Base URL: http://google-breakpad.googlecode.com/svn/trunk/
Patch Set: Created 5 years, 6 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) 2006, Google Inc. 1 // Copyright (c) 2006, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 [req setHTTPBody:postBody]; 188 [req setHTTPBody:postBody];
189 [req setHTTPMethod:@"POST"]; 189 [req setHTTPMethod:@"POST"];
190 190
191 [response_ release]; 191 [response_ release];
192 response_ = nil; 192 response_ = nil;
193 193
194 NSData *data = nil; 194 NSData *data = nil;
195 if ([[req URL] isFileURL]) { 195 if ([[req URL] isFileURL]) {
196 [[req HTTPBody] writeToURL:[req URL] options:0 error:error]; 196 [[req HTTPBody] writeToURL:[req URL] options:0 error:error];
197 } else { 197 } else {
198 NSURLResponse *response = nil;
198 data = [NSURLConnection sendSynchronousRequest:req 199 data = [NSURLConnection sendSynchronousRequest:req
199 returningResponse:&response_ 200 returningResponse:&response
200 error:error]; 201 error:error];
201 [response_ retain]; 202 response_ = (NSHTTPURLResponse *)[response retain];
202 } 203 }
203 [req release]; 204 [req release];
204 205
205 return data; 206 return data;
206 } 207 }
207 208
208 //============================================================================= 209 //=============================================================================
209 - (NSHTTPURLResponse *)response { 210 - (NSHTTPURLResponse *)response {
210 return response_; 211 return response_;
211 } 212 }
212 213
213 @end 214 @end
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