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

Unified Diff: chrome/browser/browsing_data/browsing_data_remover.cc

Issue 888843005: Closing a guest session clears all browsing history. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CrOS passes Created 5 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b7b22d2bf0b8539a8a8337cdb4a0669cebdc3194 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc
@@ -647,8 +647,12 @@ 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. OTR Profile
+ // has neither apps nor an ExtensionService, so ClearCachedApps fails.
+ EphemeralAppService* ephemeral_app_service =
+ EphemeralAppService::Get(profile_);
+ if (ephemeral_app_service && !profile_->IsOffTheRecord())
+ ephemeral_app_service->ClearCachedApps();
#endif
}
« no previous file with comments | « no previous file | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698