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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 13533007: Test extension reloading behavior. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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: 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();

Powered by Google App Engine
This is Rietveld 408576698