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

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: remove useless headers. 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 9d6b92c35e5bde231a9e3f3201427e6e53b54491..9814bb61595d5c34b24831d27fc86d4e17a18c46 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"
@@ -335,11 +336,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(
@@ -362,7 +365,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