Index: chrome/browser/browsing_data/browsing_data_remover.cc |
diff --git a/chrome/browser/browsing_data/browsing_data_remover.cc b/chrome/browser/browsing_data/browsing_data_remover.cc |
index 4e3b3653e819a978ef320fb89b8fbd26efa739f6..797af9756099115b33a5a80679af510effa7b3ca 100644 |
--- a/chrome/browser/browsing_data/browsing_data_remover.cc |
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc |
@@ -647,8 +647,11 @@ void BrowsingDataRemover::RemoveImpl(int remove_mask, |
content::StoragePartition::REMOVE_DATA_MASK_WEBRTC_IDENTITY; |
#if defined(ENABLE_EXTENSIONS) |
- // Clear the ephemeral apps cache. |
- EphemeralAppService::Get(profile_)->ClearCachedApps(); |
+ // Clear the ephemeral apps cache. This is NULL while testing. |
+ EphemeralAppService* ephemeral_app_service = |
+ EphemeralAppService::Get(profile_); |
+ if (ephemeral_app_service) |
+ ephemeral_app_service->ClearCachedApps(); |
#endif |
} |