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

Unified Diff: content/browser/browser_context.cc

Issue 9443033: Fail gracefully if InitializeResourceContext ends up calling itself recursively. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Respond to review comments. 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
« no previous file with comments | « no previous file | content/browser/resource_context_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_context.cc
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
index d56e797c7e2c7b7b29529742f01de6ac9a09e5a2..cabf7a21c79637dc667fe6210dcc3f92130b8423 100644
--- a/content/browser/browser_context.cc
+++ b/content/browser/browser_context.cc
@@ -79,7 +79,7 @@ void CreateQuotaManagerAndClients(BrowserContext* context) {
kAppCacheServicKeyName,
new UserDataAdapter<ChromeAppCacheService>(appcache_service));
- InitializeResourceContext(context);
+ EnsureResourceContextInitialized(context);
// Check first to avoid memory leak in unittests.
if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) {
@@ -125,9 +125,7 @@ FileSystemContext* BrowserContext::GetFileSystemContext(
}
void BrowserContext::EnsureResourceContextInitialized(BrowserContext* context) {
- if (context->GetResourceContext()->GetUserData(kWebKitContextKeyName))
- return;
- InitializeResourceContext(context);
+ content::EnsureResourceContextInitialized(context);
}
BrowserContext::~BrowserContext() {
« no previous file with comments | « no previous file | content/browser/resource_context_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698