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

Unified Diff: webkit/fileapi/file_system_url.cc

Issue 10810053: Enables internal filesystem types via Isolated filesystems (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: layout test crash fix Created 8 years, 5 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 | « webkit/fileapi/file_system_url.h ('k') | webkit/fileapi/file_system_url_request_job_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_url.cc
diff --git a/webkit/fileapi/file_system_url.cc b/webkit/fileapi/file_system_url.cc
index d83310d425ee7c42e7f17e13930d6268a0b9d77c..ab0c2d8f6838d4f6f578ff9c4d8108b8c2be3943 100644
--- a/webkit/fileapi/file_system_url.cc
+++ b/webkit/fileapi/file_system_url.cc
@@ -6,6 +6,7 @@
#include "webkit/fileapi/file_system_types.h"
#include "webkit/fileapi/file_system_util.h"
+#include "webkit/fileapi/isolated_context.h"
namespace fileapi {
@@ -15,6 +16,7 @@ FileSystemURL::FileSystemURL()
FileSystemURL::FileSystemURL(const GURL& url)
: type_(kFileSystemTypeUnknown) {
is_valid_ = CrackFileSystemURL(url, &origin_, &type_, &path_);
+ MayCrackIsolatedPath();
}
FileSystemURL::FileSystemURL(
@@ -24,7 +26,9 @@ FileSystemURL::FileSystemURL(
: origin_(origin),
type_(type),
path_(path),
- is_valid_(true) {}
+ is_valid_(true) {
+ MayCrackIsolatedPath();
+}
FileSystemURL::~FileSystemURL() {}
@@ -43,7 +47,17 @@ bool FileSystemURL::operator==(const FileSystemURL& that) const {
return origin_ == that.origin_ &&
type_ == that.type_ &&
path_ == that.path_ &&
+ filesystem_id_ == that.filesystem_id_ &&
is_valid_ == that.is_valid_;
}
+void FileSystemURL::MayCrackIsolatedPath() {
+ if (is_valid_ && type_ == kFileSystemTypeIsolated) {
+ // If the type is isolated, crack the path further to get the 'real'
+ // filesystem type and path.
+ is_valid_ = IsolatedContext::GetInstance()->CrackIsolatedPath(
+ path_, &filesystem_id_, &type_, &path_);
+ }
+}
+
} // namespace fileapi
« no previous file with comments | « webkit/fileapi/file_system_url.h ('k') | webkit/fileapi/file_system_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698