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

Side by Side Diff: webkit/fileapi/file_system_dir_url_request_job.cc

Issue 11787028: New FileSystemURL cracking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test on Win Created 7 years, 11 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) 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/fileapi/file_system_dir_url_request_job.h" 5 #include "webkit/fileapi/file_system_dir_url_request_job.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 72 }
73 73
74 bool FileSystemDirURLRequestJob::GetCharset(std::string* charset) { 74 bool FileSystemDirURLRequestJob::GetCharset(std::string* charset) {
75 *charset = "utf-8"; 75 *charset = "utf-8";
76 return true; 76 return true;
77 } 77 }
78 78
79 void FileSystemDirURLRequestJob::StartAsync() { 79 void FileSystemDirURLRequestJob::StartAsync() {
80 if (!request_) 80 if (!request_)
81 return; 81 return;
82 url_ = FileSystemURL(request_->url()); 82 url_ = file_system_context_->CrackURL(request_->url());
83 base::PlatformFileError error_code; 83 base::PlatformFileError error_code;
84 FileSystemOperation* operation = GetNewOperation(&error_code); 84 FileSystemOperation* operation = GetNewOperation(&error_code);
85 if (error_code != base::PLATFORM_FILE_OK) { 85 if (error_code != base::PLATFORM_FILE_OK) {
86 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, 86 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED,
87 net::PlatformFileErrorToNetError(error_code))); 87 net::PlatformFileErrorToNetError(error_code)));
88 return; 88 return;
89 } 89 }
90 operation->ReadDirectory( 90 operation->ReadDirectory(
91 url_, 91 url_,
92 base::Bind(&FileSystemDirURLRequestJob::DidReadDirectory, this)); 92 base::Bind(&FileSystemDirURLRequestJob::DidReadDirectory, this));
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 NotifyHeadersComplete(); 142 NotifyHeadersComplete();
143 } 143 }
144 } 144 }
145 145
146 FileSystemOperation* FileSystemDirURLRequestJob::GetNewOperation( 146 FileSystemOperation* FileSystemDirURLRequestJob::GetNewOperation(
147 base::PlatformFileError* error_code) { 147 base::PlatformFileError* error_code) {
148 return file_system_context_->CreateFileSystemOperation(url_, error_code); 148 return file_system_context_->CreateFileSystemOperation(url_, error_code);
149 } 149 }
150 150
151 } // namespace fileapi 151 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_context_unittest.cc ('k') | webkit/fileapi/file_system_dir_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698