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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_private_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_private_api.cc
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
index a9bb6882d6e094b2b87890fc1ef37d86853f0e33..078cd529086089ddd8d0f5e9a227182fb9ff8f8c 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
@@ -49,6 +49,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 "grit/generated_resources.h"
#include "grit/platform_locale_settings.h"
@@ -175,7 +176,8 @@ void AddDriveMountPoint(
const std::string& extension_id,
content::RenderViewHost* render_view_host) {
fileapi::ExternalFileSystemMountPointProvider* provider =
- BrowserContext::GetFileSystemContext(profile)->external_provider();
+ BrowserContext::GetDefaultStoragePartition(profile)->
+ GetFileSystemContext()->external_provider();
if (!provider)
return;
@@ -453,7 +455,8 @@ bool RequestLocalFileSystemFunction::RunImpl() {
return false;
scoped_refptr<fileapi::FileSystemContext> file_system_context =
- BrowserContext::GetFileSystemContext(profile_);
+ BrowserContext::GetDefaultStoragePartition(profile_)->
+ GetFileSystemContext();
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::Bind(
@@ -515,7 +518,8 @@ bool FileWatchBrowserFunctionBase::RunImpl() {
GURL file_watch_url(url);
scoped_refptr<fileapi::FileSystemContext> file_system_context =
- BrowserContext::GetFileSystemContext(profile_);
+ BrowserContext::GetDefaultStoragePartition(profile_)->
+ GetFileSystemContext();
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::Bind(
@@ -971,7 +975,8 @@ void FileBrowserFunction::GetLocalPathsOnFileThreadAndRunCallbackOnUIThread(
const UrlList& file_urls,
GetLocalPathsCallback callback) {
scoped_refptr<fileapi::FileSystemContext> file_system_context =
- BrowserContext::GetFileSystemContext(profile_);
+ BrowserContext::GetDefaultStoragePartition(profile())->
+ GetFileSystemContext();
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::Bind(
@@ -2503,9 +2508,10 @@ bool SearchDriveFunction::RunImpl() {
if (!args_->GetString(1, &next_feed_))
return false;
- BrowserContext::GetFileSystemContext(profile())->OpenFileSystem(
- source_url_.GetOrigin(), fileapi::kFileSystemTypeExternal, false,
- base::Bind(&SearchDriveFunction::OnFileSystemOpened, this));
+ BrowserContext::GetDefaultStoragePartition(profile())->
+ GetFileSystemContext()->OpenFileSystem(
+ source_url_.GetOrigin(), fileapi::kFileSystemTypeExternal, false,
+ base::Bind(&SearchDriveFunction::OnFileSystemOpened, this));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698