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

Unified Diff: chrome/browser/profiles/profile_manager_unittest.cc

Issue 9420036: Also delay regular profile destruction... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
Index: chrome/browser/profiles/profile_manager_unittest.cc
===================================================================
--- chrome/browser/profiles/profile_manager_unittest.cc (revision 122340)
+++ chrome/browser/profiles/profile_manager_unittest.cc (working copy)
@@ -501,13 +501,16 @@
ProfileManager* profile_manager = g_browser_process->profile_manager();
// Successfully create the profiles.
- Profile* profile1 = profile_manager->GetProfile(dest_path1);
+ TestingProfile* profile1 =
+ static_cast<TestingProfile*>(profile_manager->GetProfile(dest_path1));
ASSERT_TRUE(profile1);
- TestingProfile* profile2 =
- static_cast<TestingProfile*>(profile_manager->GetProfile(dest_path2));
+ // incognito profiles should not be managed by the profile manager but by the
+ // original profile.
+ TestingProfile* profile2 = new TestingProfile();
ASSERT_TRUE(profile2);
profile2->set_incognito(true);
+ profile1->SetOffTheRecordProfile(profile2);
std::vector<Profile*> last_opened_profiles =
profile_manager->GetLastOpenedProfiles();

Powered by Google App Engine
This is Rietveld 408576698