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

Unified Diff: chrome/browser/chromeos/extensions/file_manager_util.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_manager_util.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager_util.cc b/chrome/browser/chromeos/extensions/file_manager_util.cc
index 32f6c2ef40ee862df9df457fcb550d0f70113046..f127297ad0243fd87b7cd52a14b319cb28589440 100644
--- a/chrome/browser/chromeos/extensions/file_manager_util.cc
+++ b/chrome/browser/chromeos/extensions/file_manager_util.cc
@@ -41,6 +41,7 @@
#include "chrome/common/url_constants.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/plugin_service.h"
+#include "content/public/browser/storage_partition.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
@@ -304,7 +305,8 @@ bool ConvertFileToFileSystemUrl(
bool ConvertFileToRelativeFileSystemPath(
Profile* profile, const FilePath& full_file_path, FilePath* virtual_path) {
fileapi::ExternalFileSystemMountPointProvider* provider =
- BrowserContext::GetFileSystemContext(profile)->external_provider();
+ BrowserContext::GetDefaultStoragePartition(profile)->
+ GetFileSystemContext()->external_provider();
if (!provider)
return false;
@@ -563,7 +565,8 @@ bool ExecuteDefaultHandler(Profile* profile, const FilePath& path) {
// If File Browser has not been open yet then it did not request access
// to the file system. Do it now.
fileapi::ExternalFileSystemMountPointProvider* external_provider =
- BrowserContext::GetFileSystemContext(profile)->external_provider();
+ BrowserContext::GetDefaultStoragePartition(
+ profile)->GetFileSystemContext()->external_provider();
if (!external_provider)
return false;
external_provider->GrantFullAccessToExtension(source_url.host());

Powered by Google App Engine
This is Rietveld 408576698