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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_handler_api.cc

Issue 10909182: Make FileSystemContext respect StoragePartitions. filesystem:// urls will be properly isolated (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch unittest fix from michael Created 8 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
Index: chrome/browser/chromeos/extensions/file_browser_handler_api.cc
diff --git a/chrome/browser/chromeos/extensions/file_browser_handler_api.cc b/chrome/browser/chromeos/extensions/file_browser_handler_api.cc
index 1416125c45d7af03f7d93a25fb4bf66c863ae59e..2b5b79a680ab96a36974edbf3515f132f31e5f5e 100644
--- a/chrome/browser/chromeos/extensions/file_browser_handler_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_handler_api.cc
@@ -54,6 +54,7 @@
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/storage_partition.h"
#include "googleurl/src/gurl.h"
#include "webkit/fileapi/file_system_context.h"
#include "webkit/fileapi/file_system_mount_point_provider.h"
@@ -293,11 +294,13 @@ void FileHandlerSelectFileFunction::OnFilePathSelected(
// We have to open file system in order to create a FileEntry object for the
// selected file path.
- BrowserContext::GetFileSystemContext(profile_)->OpenFileSystem(
- source_url_.GetOrigin(), fileapi::kFileSystemTypeExternal, false,
- base::Bind(&RunOpenFileSystemCallback,
- base::Bind(&FileHandlerSelectFileFunction::OnFileSystemOpened,
- this)));
+ BrowserContext::GetDefaultStoragePartition(profile_)->
+ GetFileSystemContext()->OpenFileSystem(
+ source_url_.GetOrigin(), fileapi::kFileSystemTypeExternal, false,
+ base::Bind(
+ &RunOpenFileSystemCallback,
+ base::Bind(&FileHandlerSelectFileFunction::OnFileSystemOpened,
+ this)));
};
void FileHandlerSelectFileFunction::OnFileSystemOpened(
@@ -320,7 +323,8 @@ void FileHandlerSelectFileFunction::OnFileSystemOpened(
void FileHandlerSelectFileFunction::GrantPermissions() {
fileapi::ExternalFileSystemMountPointProvider* external_provider =
- BrowserContext::GetFileSystemContext(profile_)->external_provider();
+ BrowserContext::GetDefaultStoragePartition(profile_)->
+ GetFileSystemContext()->external_provider();
DCHECK(external_provider);
external_provider->GetVirtualPath(full_path_, &virtual_path_);

Powered by Google App Engine
This is Rietveld 408576698