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

Unified Diff: chrome/browser/browsing_data_file_system_helper.cc

Issue 9419033: Move creation of BrowserContext objects that live in content to content, instead of depending on th… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fix memory leaks in tests Created 8 years, 10 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_file_system_helper.cc
===================================================================
--- chrome/browser/browsing_data_file_system_helper.cc (revision 122721)
+++ chrome/browser/browsing_data_file_system_helper.cc (working copy)
@@ -18,6 +18,7 @@
#include "webkit/fileapi/file_system_types.h"
#include "webkit/fileapi/sandbox_mount_point_provider.h"
+using content::BrowserContext;
using content::BrowserThread;
namespace {
@@ -113,13 +114,14 @@
void BrowsingDataFileSystemHelperImpl::FetchFileSystemInfoInFileThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
scoped_ptr<fileapi::SandboxMountPointProvider::OriginEnumerator>
- origin_enumerator(profile_->GetFileSystemContext()->
+ origin_enumerator(BrowserContext::GetFileSystemContext(profile_)->
sandbox_provider()->CreateOriginEnumerator());
// We don't own this pointer; it's a magic singleton generated by the
// profile's FileSystemContext. Deleting it would be a bad idea.
- fileapi::FileSystemQuotaUtil* quota_util = profile_->
- GetFileSystemContext()->GetQuotaUtil(fileapi::kFileSystemTypeTemporary);
+ fileapi::FileSystemQuotaUtil* quota_util =
+ BrowserContext::GetFileSystemContext(profile_)->GetQuotaUtil(
+ fileapi::kFileSystemTypeTemporary);
GURL current;
while (!(current = origin_enumerator->Next()).is_empty()) {
@@ -164,7 +166,8 @@
void BrowsingDataFileSystemHelperImpl::DeleteFileSystemOriginInFileThread(
const GURL& origin) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- profile_->GetFileSystemContext()->DeleteDataForOriginOnFileThread(origin);
+ BrowserContext::GetFileSystemContext(profile_)->
+ DeleteDataForOriginOnFileThread(origin);
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698