Index: chrome/browser/profiles/profile_manager.cc |
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc |
index 1337b660518f900c4762c19bbbc2140b850de314..de946352615a770b42ab8a79712fcfba8e34e5b1 100644 |
--- a/chrome/browser/profiles/profile_manager.cc |
+++ b/chrome/browser/profiles/profile_manager.cc |
@@ -459,6 +459,9 @@ void ProfileManager::CreateProfileAsync( |
} |
bool ProfileManager::IsValidProfile(Profile* profile) { |
+ // The profile_manager() returns NULL when running unit tests. |
+ if (!g_browser_process->profile_manager()) |
Lei Zhang
2015/09/02 18:14:43
Curious, why is this even needed? What happens if
amohammadkhan
2015/09/03 04:31:19
It was causing segmentation fault in tests. It see
Lei Zhang
2015/09/03 04:47:11
I'm skeptical this is the right thing to do. Profi
amohammadkhan
2015/09/03 23:10:35
ChromeNetworkDelegateTest.DataUseMeasurementUserTe
Lei Zhang
2015/09/04 01:18:06
The right fix is to do the check in the caller, wh
amohammadkhan
2015/09/04 17:25:11
Done.
|
+ return false; |
for (ProfilesInfoMap::iterator iter = profiles_info_.begin(); |
iter != profiles_info_.end(); ++iter) { |
if (iter->second->created) { |