Index: chrome/browser/chrome_content_browser_client.cc |
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
index 33d1c222b7822cd53a72bf351841c0cd6f044772..ae8c142c16ac93f8d2c43808d02e6a954fef3128 100644 |
--- a/chrome/browser/chrome_content_browser_client.cc |
+++ b/chrome/browser/chrome_content_browser_client.cc |
@@ -898,8 +898,12 @@ bool ChromeContentBrowserClient::ShouldTryToUseExistingProcessHost( |
// Go through all profiles to ensure we have total count of extension |
// processes containing background pages, otherwise one profile can |
// starve the other. |
- std::vector<Profile*> profiles = g_browser_process->profile_manager()-> |
- GetLoadedProfiles(); |
+ ProfileManager* profile_manager = g_browser_process->profile_manager(); |
+ // Tests may not set up a profile manager. |
Matt Perry
2013/04/04 20:54:26
Can we fix that instead?
Paweł Hajdan Jr.
2013/04/04 21:30:05
Probably, see TestingBrowserProcess::SetProfileMan
Jeffrey Yasskin
2013/04/05 13:14:01
Some of the uses of that function re-set it to NUL
|
+ if (profile_manager == NULL) |
+ return false; |
+ |
+ std::vector<Profile*> profiles = profile_manager->GetLoadedProfiles(); |
for (size_t i = 0; i < profiles.size(); ++i) { |
ExtensionProcessManager* epm = |
extensions::ExtensionSystem::Get(profiles[i])->process_manager(); |