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

Unified Diff: chrome/browser/extensions/extensions_service.cc

Issue 258008: Move initialization of ChromeURLRequestContexts to the IO thread. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync again, just in case Created 11 years, 2 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 | « chrome/browser/download/save_package.cc ('k') | chrome/browser/gtk/options/cookies_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extensions_service.cc
===================================================================
--- chrome/browser/extensions/extensions_service.cc (revision 29872)
+++ chrome/browser/extensions/extensions_service.cc (working copy)
@@ -326,12 +326,13 @@
// for the extension may try to load an extension URL with an extension id
// that the request context doesn't yet know about.
if (profile_ && !profile_->IsOffTheRecord()) {
- ChromeURLRequestContext* context = static_cast<ChromeURLRequestContext*>(
- profile_->GetRequestContext());
- if (context) {
+ ChromeURLRequestContextGetter* context_getter =
+ static_cast<ChromeURLRequestContextGetter*>(
+ profile_->GetRequestContext());
+ if (context_getter) {
g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
- NewRunnableMethod(context,
- &ChromeURLRequestContext::OnNewExtensions,
+ NewRunnableMethod(context_getter,
+ &ChromeURLRequestContextGetter::OnNewExtensions,
extension->id(),
extension->path()));
}
@@ -352,13 +353,15 @@
Details<Extension>(extension));
if (profile_ && !profile_->IsOffTheRecord()) {
- ChromeURLRequestContext* context = static_cast<ChromeURLRequestContext*>(
- profile_->GetRequestContext());
- if (context) {
+ ChromeURLRequestContextGetter* context_getter =
+ static_cast<ChromeURLRequestContextGetter*>(
+ profile_->GetRequestContext());
+ if (context_getter) {
g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
- NewRunnableMethod(context,
- &ChromeURLRequestContext::OnUnloadedExtension,
- extension->id()));
+ NewRunnableMethod(
+ context_getter,
+ &ChromeURLRequestContextGetter::OnUnloadedExtension,
+ extension->id()));
}
}
}
« no previous file with comments | « chrome/browser/download/save_package.cc ('k') | chrome/browser/gtk/options/cookies_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698