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_); |