Index: chrome/app/chrome_main_delegate.cc |
=================================================================== |
--- chrome/app/chrome_main_delegate.cc (revision 132480) |
+++ chrome/app/chrome_main_delegate.cc (working copy) |
@@ -448,6 +448,19 @@ |
command_line.HasSwitch(switches::kEnableBenchmarking)) { |
base::FieldTrial::EnableBenchmarking(); |
} |
+ |
+ // Initialize the content client very early on in the main initialization |
+ // sequence, ContentMainRunner depends on methods of ContentClient, in |
+ // particular the AddAdditionalSchemes() method which returns internal Chrome |
+ // schemes to be registered with googleurl has having the standard |
+ // <scheme>://<host>:<port>/<path> parsing semantics. This must happen before |
+ // processing any URLs with the affected schemes, and must be done in all |
+ // processes that work with these URLs (i.e. including renderers). |
jam
2012/04/17 03:30:10
nit: this comment is describing what the code does
michaeln
2012/04/17 04:08:26
How about i leave it at...
// Initialize the conte
jam
2012/04/17 04:49:51
I think that's still documenting why something is
michaeln
2012/04/17 19:23:32
Ok, removed these retained comments. Fyi, there ar
|
+ std::string process_type = command_line.GetSwitchValueASCII( |
+ switches::kProcessType); |
+ content::SetContentClient(&chrome_content_client_); |
+ InitializeChromeContentClient(process_type); |
+ |
return false; |
} |
@@ -544,10 +557,6 @@ |
std::string process_type = |
command_line.GetSwitchValueASCII(switches::kProcessType); |
- // Initialize the content client which that code uses to talk to Chrome. |
- content::SetContentClient(&chrome_content_client_); |
- InitializeChromeContentClient(process_type); |
- |
// Initialize the Chrome path provider. |
chrome::RegisterPathProvider(); |
@@ -596,12 +605,6 @@ |
} |
logging::InitChromeLogging(command_line, file_state); |
- // Register internal Chrome schemes so they'll be parsed correctly. This |
- // must happen before we process any URLs with the affected schemes, and |
- // must be done in all processes that work with these URLs (i.e. including |
- // renderers). |
- chrome::RegisterChromeSchemes(); |
- |
#if defined(OS_WIN) |
// TODO(darin): Kill this once http://crbug.com/52609 is fixed. |
ui::SetResourcesDataDLL(_AtlBaseModule.GetResourceInstance()); |