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

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

Issue 2298283002: Site Settings Desktop: Support adding exceptions for incognito mode. (Closed)
Patch Set: Fix remaining tests 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..aebb6ad558b69d3b3ad26ee1f2bd7caed420cd7d 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -867,8 +867,11 @@ content::PushMessagingService* TestingProfile::GetPushMessagingService() {
return NULL;
}
-bool TestingProfile::IsSameProfile(Profile *p) {
- return this == p;
+bool TestingProfile::IsSameProfile(Profile *profile) {
+ if (this == profile)
+ return true;
+ Profile* otr_profile = incognito_profile_.get();
+ return otr_profile && profile == otr_profile;
}
base::Time TestingProfile::GetStartTime() const {

Powered by Google App Engine
This is Rietveld 408576698