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

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

Issue 6286038: Add initial code to do filename munging in the FileSystem.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/file_util_proxy.h" 10 #include "base/file_util_proxy.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 stream_.Close(); 93 stream_.Close();
94 94
95 net::URLRequestJob::Kill(); 95 net::URLRequestJob::Kill();
96 callback_factory_.RevokeAll(); 96 callback_factory_.RevokeAll();
97 method_factory_.RevokeAll(); 97 method_factory_.RevokeAll();
98 } 98 }
99 99
100 void BlobURLRequestJob::ResolveFile(const FilePath& file_path) { 100 void BlobURLRequestJob::ResolveFile(const FilePath& file_path) {
101 // If the file thread proxy is provided, we can use it get the file info. 101 // If the file thread proxy is provided, we can use it get the file info.
102 if (file_thread_proxy_) { 102 if (file_thread_proxy_) {
103 base::FileUtilProxy::GetFileInfo( 103 base::FileUtilProxy::GetInstance()->GetFileInfo(
104 file_thread_proxy_, 104 file_thread_proxy_,
105 file_path, 105 file_path,
106 callback_factory_.NewCallback(&BlobURLRequestJob::DidResolve)); 106 callback_factory_.NewCallback(&BlobURLRequestJob::DidResolve));
107 return; 107 return;
108 } 108 }
109 109
110 // Otherwise, we use current thread, i.e. IO thread, as this is the case when 110 // Otherwise, we use current thread, i.e. IO thread, as this is the case when
111 // we run the unittest or test shell. 111 // we run the unittest or test shell.
112 // TODO(jianli): Consider using the proxy of current thread. 112 // TODO(jianli): Consider using the proxy of current thread.
113 base::PlatformFileInfo file_info; 113 base::PlatformFileInfo file_info;
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 // We don't support multiple range requests in one single URL request, 536 // We don't support multiple range requests in one single URL request,
537 // because we need to do multipart encoding here. 537 // because we need to do multipart encoding here.
538 // TODO(jianli): Support multipart byte range requests. 538 // TODO(jianli): Support multipart byte range requests.
539 NotifyFailure(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE); 539 NotifyFailure(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE);
540 } 540 }
541 } 541 }
542 } 542 }
543 } 543 }
544 544
545 } // namespace webkit_blob 545 } // namespace webkit_blob
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698