diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-16 07:31:43 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-16 07:31:43 +0000 |
commit | b1b502e724c0d5fa36a3b490272dfe41a83f8ad8 (patch) | |
tree | e18139a0b5a4a3eaa11fe9ec3fc223a089ff9c52 /content/browser/browser_context.cc | |
parent | dc4cb29749eca6aafd28161e61ec23b64c3c6a4f (diff) | |
download | chromium_src-b1b502e724c0d5fa36a3b490272dfe41a83f8ad8.zip chromium_src-b1b502e724c0d5fa36a3b490272dfe41a83f8ad8.tar.gz chromium_src-b1b502e724c0d5fa36a3b490272dfe41a83f8ad8.tar.bz2 |
Move IndexedDBContext into the StoragePartition and ensure isolation.
This pickups up from http://codereview.chromium.org/10836216. After this, IndexedDB should be properly isolated in ChromeApps and Isolated Sites.
TBR=kalman,sky,mkwst
BUG=85121
Review URL: https://chromiumcodereview.appspot.com/10919307
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157045 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_context.cc')
-rw-r--r-- | content/browser/browser_context.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc index 8e4c9b75..3b33c31 100644 --- a/content/browser/browser_context.cc +++ b/content/browser/browser_context.cc @@ -103,13 +103,6 @@ DownloadManager* BrowserContext::GetDownloadManager( context, kDownloadManagerKeyName); } -IndexedDBContext* BrowserContext::GetIndexedDBContext( - BrowserContext* browser_context) { - // TODO(ajwong): Change this API to require a SiteInstance instead of - // using GetDefaultStoragePartition(). - return GetDefaultStoragePartition(browser_context)->GetIndexedDBContext(); -} - fileapi::FileSystemContext* BrowserContext::GetFileSystemContext( BrowserContext* browser_context) { // TODO(ajwong): Change this API to require a SiteInstance instead of @@ -173,6 +166,8 @@ void BrowserContext::EnsureResourceContextInitialized(BrowserContext* context) { void BrowserContext::SaveSessionState(BrowserContext* browser_context) { GetDefaultStoragePartition(browser_context)->GetDatabaseTracker()-> SetForceKeepSessionState(); + StoragePartition* storage_partition = + BrowserContext::GetDefaultStoragePartition(browser_context); if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) { BrowserThread::PostTask( @@ -180,18 +175,17 @@ void BrowserContext::SaveSessionState(BrowserContext* browser_context) { base::Bind( &SaveSessionStateOnIOThread, make_scoped_refptr(browser_context->GetRequestContext()), - BrowserContext::GetDefaultStoragePartition(browser_context)-> - GetAppCacheService())); + storage_partition->GetAppCacheService())); } DOMStorageContextImpl* dom_storage_context_impl = static_cast<DOMStorageContextImpl*>( - GetDefaultStoragePartition(browser_context)->GetDOMStorageContext()); + storage_partition->GetDOMStorageContext()); dom_storage_context_impl->SetForceKeepSessionState(); if (BrowserThread::IsMessageLoopValid(BrowserThread::WEBKIT_DEPRECATED)) { IndexedDBContextImpl* indexed_db = static_cast<IndexedDBContextImpl*>( - GetIndexedDBContext(browser_context)); + storage_partition->GetIndexedDBContext()); BrowserThread::PostTask( BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, base::Bind(&SaveSessionStateOnWebkitThread, |