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

Unified Diff: chrome/browser/extensions/extension_file_browser_private_api.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/extensions/extension_file_browser_private_api.cc
===================================================================
--- chrome/browser/extensions/extension_file_browser_private_api.cc (revision 122721)
+++ chrome/browser/extensions/extension_file_browser_private_api.cc (working copy)
@@ -54,6 +54,7 @@
#endif
using chromeos::disks::DiskMountManager;
+using content::BrowserContext;
using content::BrowserThread;
using content::ChildProcessSecurityPolicy;
using content::SiteInstance;
@@ -389,7 +390,7 @@
}
fileapi::ExternalFileSystemMountPointProvider* provider =
- profile_->GetFileSystemContext()->external_provider();
+ BrowserContext::GetFileSystemContext(profile_)->external_provider();
if (!provider)
return false;
@@ -420,7 +421,7 @@
void RequestLocalFileSystemFunction::RequestOnFileThread(
const GURL& source_url, int child_id) {
GURL origin_url = source_url.GetOrigin();
- profile()->GetFileSystemContext()->OpenFileSystem(
+ BrowserContext::GetFileSystemContext(profile())->OpenFileSystem(
origin_url, fileapi::kFileSystemTypeExternal, false, // create
LocalFileSystemCallbackDispatcher::CreateCallback(
this,
@@ -473,8 +474,8 @@
if (type != fileapi::kFileSystemTypeExternal)
return false;
- FilePath root_path = profile_->GetFileSystemContext()->external_provider()->
- GetFileSystemRootPathOnFileThread(
+ FilePath root_path = BrowserContext::GetFileSystemContext(profile_)->
+ external_provider()->GetFileSystemRootPathOnFileThread(
file_origin_url,
fileapi::kFileSystemTypeExternal,
*virtual_path,
@@ -744,7 +745,7 @@
return false;
fileapi::ExternalFileSystemMountPointProvider* external_provider =
- profile_->GetFileSystemContext()->external_provider();
+ BrowserContext::GetFileSystemContext(profile_)->external_provider();
if (!external_provider)
return false;
@@ -871,7 +872,7 @@
const std::vector<GURL>& file_urls) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
GURL origin_url = source_url.GetOrigin();
- profile()->GetFileSystemContext()->OpenFileSystem(
+ BrowserContext::GetFileSystemContext(profile())->OpenFileSystem(
origin_url, fileapi::kFileSystemTypeExternal, false, // create
ExecuteTasksFileSystemCallbackDispatcher::CreateCallback(
this,
@@ -1005,7 +1006,7 @@
// FilePath(virtual_path) doesn't work on win, so limit this to ChromeOS.
#if defined(OS_CHROMEOS)
fileapi::ExternalFileSystemMountPointProvider* provider =
- profile_->GetFileSystemContext()->external_provider();
+ BrowserContext::GetFileSystemContext(profile_)->external_provider();
if (!provider) {
LOG(WARNING) << "External provider is not available";
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698