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

Side by Side Diff: webkit/blob/blob_url_request_job.cc

Issue 9349005: net: Rename FileStream::Open/Close with OpenSync/CloseSync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 10 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 | « net/url_request/url_request_file_job.cc ('k') | webkit/fileapi/file_system_url_request_job.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/blob/blob_url_request_job.h" 5 #include "webkit/blob/blob_url_request_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 return; 95 return;
96 } 96 }
97 97
98 CountSize(); 98 CountSize();
99 } 99 }
100 100
101 void BlobURLRequestJob::CloseStream() { 101 void BlobURLRequestJob::CloseStream() {
102 if (stream_ != NULL) { 102 if (stream_ != NULL) {
103 // stream_.Close() blocks the IO thread, see http://crbug.com/75548. 103 // stream_.Close() blocks the IO thread, see http://crbug.com/75548.
104 base::ThreadRestrictions::ScopedAllowIO allow_io; 104 base::ThreadRestrictions::ScopedAllowIO allow_io;
105 stream_->Close(); 105 stream_->CloseSync();
106 stream_.reset(NULL); 106 stream_.reset(NULL);
107 } 107 }
108 } 108 }
109 109
110 void BlobURLRequestJob::Kill() { 110 void BlobURLRequestJob::Kill() {
111 CloseStream(); 111 CloseStream();
112 112
113 net::URLRequestJob::Kill(); 113 net::URLRequestJob::Kill();
114 weak_factory_.InvalidateWeakPtrs(); 114 weak_factory_.InvalidateWeakPtrs();
115 } 115 }
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 // We don't support multiple range requests in one single URL request, 560 // We don't support multiple range requests in one single URL request,
561 // because we need to do multipart encoding here. 561 // because we need to do multipart encoding here.
562 // TODO(jianli): Support multipart byte range requests. 562 // TODO(jianli): Support multipart byte range requests.
563 NotifyFailure(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE); 563 NotifyFailure(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE);
564 } 564 }
565 } 565 }
566 } 566 }
567 } 567 }
568 568
569 } // namespace webkit_blob 569 } // namespace webkit_blob
OLDNEW
« no previous file with comments | « net/url_request/url_request_file_job.cc ('k') | webkit/fileapi/file_system_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698