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

Unified Diff: chrome/test/base/testing_profile.cc

Issue 2298283002: Site Settings Desktop: Support adding exceptions for incognito mode. (Closed)
Patch Set: Fix test Created 4 years, 3 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/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 943b927e2c7b13d187010018dfd507a7fce8f391..01875e9f2bc1ecda8e8a285c1cbf79e73e6a6164 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -700,6 +700,17 @@ Profile* TestingProfile::GetOffTheRecordProfile() {
return incognito_profile_.get();
}
+void TestingProfile::DestroyOffTheRecordProfile() {
+ if (!incognito_profile_)
+ return;
+
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_PROFILE_DESTROYED,
+ content::Source<Profile>(incognito_profile_.get()),
+ content::NotificationService::NoDetails());
+ incognito_profile_.reset();
+}
+
bool TestingProfile::HasOffTheRecordProfile() {
return incognito_profile_.get() != NULL;
}

Powered by Google App Engine
This is Rietveld 408576698