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

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

Issue 181403006: Make TestingProfile auto-create incognito profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove broken and no-longer-applicable test Created 6 years, 9 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 | « chrome/browser/ui/views/frame/browser_view_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index d40d38394eb1e75a7079e74b0579c56b530166ff..4941c55a1a977bfb0bf1940698340c3337cfe74e 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -598,6 +598,13 @@ void TestingProfile::SetOriginalProfile(Profile* profile) {
Profile* TestingProfile::GetOffTheRecordProfile() {
if (IsOffTheRecord())
return this;
+ if (!incognito_profile_) {
+ TestingProfile::Builder builder;
+ builder.SetIncognito();
+ scoped_ptr<TestingProfile> incognito_test_profile(builder.Build());
+ incognito_test_profile->SetOriginalProfile(this);
+ SetOffTheRecordProfile(incognito_test_profile.PassAs<Profile>());
+ }
return incognito_profile_.get();
}
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698