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

Unified Diff: chrome/browser/browsing_data/browsing_data_file_system_helper.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/browsing_data/browsing_data_file_system_helper.cc
diff --git a/chrome/browser/browsing_data/browsing_data_file_system_helper.cc b/chrome/browser/browsing_data/browsing_data_file_system_helper.cc
index c1bd4320bee3a93aca0f305def8aee0ff78dc2fe..4d4197b36ef29a43e858e8b335db50087248245e 100644
--- a/chrome/browser/browsing_data/browsing_data_file_system_helper.cc
+++ b/chrome/browser/browsing_data/browsing_data_file_system_helper.cc
@@ -12,7 +12,7 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browsing_data/browsing_data_helper.h"
-#include "chrome/browser/profiles/profile.h"
+#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "webkit/fileapi/file_system_context.h"
#include "webkit/fileapi/file_system_quota_util.h"
@@ -22,15 +22,20 @@
using content::BrowserContext;
using content::BrowserThread;
+namespace fileapi {
+class FileSystemContext;
+}
+
namespace {
// An implementation of the BrowsingDataFileSystemHelper interface that pulls
-// data from a given |profile| and returns a list of FileSystemInfo items to a
+// data from a given |context| and returns a list of FileSystemInfo items to a
// client.
class BrowsingDataFileSystemHelperImpl : public BrowsingDataFileSystemHelper {
public:
// BrowsingDataFileSystemHelper implementation
- explicit BrowsingDataFileSystemHelperImpl(Profile* profile);
+ explicit BrowsingDataFileSystemHelperImpl(
+ fileapi::FileSystemContext* context);
virtual void StartFetching(const base::Callback<
void(const std::list<FileSystemInfo>&)>& callback) OVERRIDE;
virtual void DeleteFileSystemOrigin(const GURL& origin) OVERRIDE;
@@ -77,8 +82,8 @@ class BrowsingDataFileSystemHelperImpl : public BrowsingDataFileSystemHelper {
};
BrowsingDataFileSystemHelperImpl::BrowsingDataFileSystemHelperImpl(
- Profile* profile)
- : filesystem_context_(BrowserContext::GetFileSystemContext(profile)),
+ fileapi::FileSystemContext* context)
+ : filesystem_context_(context),
is_fetching_(false) {
DCHECK(filesystem_context_);
}
@@ -184,8 +189,8 @@ BrowsingDataFileSystemHelper::FileSystemInfo::~FileSystemInfo() {}
// static
BrowsingDataFileSystemHelper* BrowsingDataFileSystemHelper::Create(
- Profile* profile) {
- return new BrowsingDataFileSystemHelperImpl(profile);
+ fileapi::FileSystemContext* file_system_context) {
+ return new BrowsingDataFileSystemHelperImpl(file_system_context);
}
CannedBrowsingDataFileSystemHelper::CannedBrowsingDataFileSystemHelper(

Powered by Google App Engine
This is Rietveld 408576698