Chromium Code Reviews| Index: webkit/browser/fileapi/file_system_url_request_job_factory.cc |
| diff --git a/webkit/browser/fileapi/file_system_url_request_job_factory.cc b/webkit/browser/fileapi/file_system_url_request_job_factory.cc |
| index 76ae7c9ac0596b801cd778fd31010d4ffcd97dbd..be3f486bf68134114529f0f97c60d2e4f993e84a 100644 |
| --- a/webkit/browser/fileapi/file_system_url_request_job_factory.cc |
| +++ b/webkit/browser/fileapi/file_system_url_request_job_factory.cc |
| @@ -19,7 +19,8 @@ namespace { |
| class FileSystemProtocolHandler |
| : public net::URLRequestJobFactory::ProtocolHandler { |
| public: |
| - explicit FileSystemProtocolHandler(FileSystemContext* context); |
| + FileSystemProtocolHandler(const std::string& storage_domain, |
| + FileSystemContext* context); |
| virtual ~FileSystemProtocolHandler(); |
| virtual net::URLRequestJob* MaybeCreateJob( |
| @@ -27,6 +28,8 @@ class FileSystemProtocolHandler |
| net::NetworkDelegate* network_delegate) const OVERRIDE; |
| private: |
| + const std::string storage_domain_; |
| + |
| // No scoped_refptr because |file_system_context_| is owned by the |
| // ProfileIOData, which also owns this ProtocolHandler. |
| FileSystemContext* const file_system_context_; |
| @@ -35,8 +38,10 @@ class FileSystemProtocolHandler |
| }; |
| FileSystemProtocolHandler::FileSystemProtocolHandler( |
| + const std::string& storage_domain, |
| FileSystemContext* context) |
| - : file_system_context_(context) { |
| + : storage_domain_(storage_domain), |
| + file_system_context_(context) { |
| DCHECK(file_system_context_); |
| } |
| @@ -51,18 +56,18 @@ net::URLRequestJob* FileSystemProtocolHandler::MaybeCreateJob( |
| // redirects back here, by adding a / to the URL. |
| if (!path.empty() && path[path.size() - 1] == '/') { |
| return new FileSystemDirURLRequestJob( |
| - request, network_delegate, file_system_context_); |
| + request, network_delegate, storage_domain_, file_system_context_); |
| } |
| return new FileSystemURLRequestJob( |
| - request, network_delegate, file_system_context_); |
| + request, network_delegate, storage_domain_, file_system_context_); |
| } |
| } // anonymous namespace |
| -net::URLRequestJobFactory::ProtocolHandler* |
| -CreateFileSystemProtocolHandler(FileSystemContext* context) { |
| +net::URLRequestJobFactory::ProtocolHandler* CreateFileSystemProtocolHandler( |
| + const std::string& storage_domain_, FileSystemContext* context) { |
|
kinuko
2014/03/13 04:19:20
nit: no trailing _ for arg
vandebo (ex-Chrome)
2014/03/13 20:19:32
Done.
|
| DCHECK(context); |
| - return new FileSystemProtocolHandler(context); |
| + return new FileSystemProtocolHandler(storage_domain_, context); |
| } |
| } // namespace fileapi |