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

Unified Diff: content/browser/browser_context.cc

Issue 10836216: Add SiteInstance parameters to IndexedDBContext calls (Closed) Base URL: http://git.chromium.org/chromium/src.git@isolated-storage
Patch Set: Address ajwong's comments 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: content/browser/browser_context.cc
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
index bae37b492a17d8a2a7ac8f0ff90079b0d8d6ddd1..e3ff64de7fc22e7863af7bb380ab0e2ad064aece 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();
-}
-
appcache::AppCacheService* BrowserContext::GetAppCacheService(
BrowserContext* browser_context) {
// TODO(ajwong): Change this API to require a SiteInstance instead of
@@ -180,6 +173,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(
@@ -187,18 +182,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,
« no previous file with comments | « chrome/browser/ui/webui/options/cookies_view_handler.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698