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

Unified Diff: chrome/browser/chromeos/fileapi/external_file_url_request_job.h

Issue 615523002: Files.app: Stop to use file system URLs having externalfile:// scheme origin internally. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/fileapi/external_file_url_request_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/fileapi/external_file_url_request_job.h
diff --git a/chrome/browser/chromeos/fileapi/external_file_url_request_job.h b/chrome/browser/chromeos/fileapi/external_file_url_request_job.h
index aa99c7e8e5faeb8009003227d34303abf27b748d..121eed2d5e960400d475fd8e671ca10cfe2ae592 100644
--- a/chrome/browser/chromeos/fileapi/external_file_url_request_job.h
+++ b/chrome/browser/chromeos/fileapi/external_file_url_request_job.h
@@ -29,15 +29,29 @@ namespace chromeos {
// requests for drive resources and FileSystem. It exposes content URLs
// formatted as drive:<drive-file-path>.
// The methods should be run on IO thread.
+// TODO(hirono): After removing MHTML support, stop to use the special
+// externalfile: scheme and use filesystem: URL directly. crbug.com/415455
class ExternalFileURLRequestJob : public net::URLRequestJob {
public:
+ // Scope of isolated file system.
+ class IsolatedFileSystemScope {
+ public:
+ explicit IsolatedFileSystemScope(const std::string& file_system_id);
+ ~IsolatedFileSystemScope();
+
+ private:
+ std::string file_system_id_;
+ DISALLOW_COPY_AND_ASSIGN(IsolatedFileSystemScope);
+ };
+
// Callback to take results from an internal helper defined in
// drive_url_request_job.cc.
- typedef base::Callback<
- void(net::Error,
- const scoped_refptr<storage::FileSystemContext>& file_system_context,
- const storage::FileSystemURL& file_system_url,
- const std::string& mime_type)> HelperCallback;
+ typedef base::Callback<void(
+ net::Error,
+ const scoped_refptr<storage::FileSystemContext>& file_system_context,
+ scoped_ptr<IsolatedFileSystemScope> isolated_file_system_scope,
+ const storage::FileSystemURL& file_system_url,
+ const std::string& mime_type)> HelperCallback;
ExternalFileURLRequestJob(void* profile_id,
net::URLRequest* request,
@@ -64,6 +78,7 @@ class ExternalFileURLRequestJob : public net::URLRequestJob {
void OnHelperResultObtained(
net::Error error,
const scoped_refptr<storage::FileSystemContext>& file_system_context,
+ scoped_ptr<IsolatedFileSystemScope> isolated_file_system_scope,
const storage::FileSystemURL& file_system_url,
const std::string& mime_type);
@@ -84,6 +99,7 @@ class ExternalFileURLRequestJob : public net::URLRequestJob {
int64 remaining_bytes_;
scoped_refptr<storage::FileSystemContext> file_system_context_;
+ scoped_ptr<IsolatedFileSystemScope> isolated_file_system_scope_;
storage::FileSystemURL file_system_url_;
std::string mime_type_;
scoped_ptr<storage::FileStreamReader> stream_reader_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/fileapi/external_file_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698