| Index: chrome/test/base/testing_profile_manager.cc
|
| diff --git a/chrome/test/base/testing_profile_manager.cc b/chrome/test/base/testing_profile_manager.cc
|
| index 63295182710194961813fe246e05013f63ed4b3a..ce0a8cf4a910031550456469d939863fad1be317 100644
|
| --- a/chrome/test/base/testing_profile_manager.cc
|
| +++ b/chrome/test/base/testing_profile_manager.cc
|
| @@ -18,6 +18,7 @@
|
| #endif
|
|
|
| const char kGuestProfileName[] = "Guest";
|
| +const char kSystemProfileName[] = "System";
|
|
|
| namespace testing {
|
|
|
| @@ -136,6 +137,24 @@ TestingProfile* TestingProfileManager::CreateGuestProfile() {
|
| return profile;
|
| }
|
|
|
| +TestingProfile* TestingProfileManager::CreateSystemProfile() {
|
| + DCHECK(called_set_up_);
|
| +
|
| + // Create the profile and register it.
|
| + TestingProfile::Builder builder;
|
| + builder.SetPath(ProfileManager::GetSystemProfilePath());
|
| +
|
| + // Add the guest profile to the profile manager, but not to the info cache.
|
| + TestingProfile* profile = builder.Build().release();
|
| + profile->set_profile_name(kSystemProfileName);
|
| +
|
| + profile_manager_->AddProfile(profile); // Takes ownership.
|
| +
|
| + testing_profiles_.insert(std::make_pair(kSystemProfileName, profile));
|
| +
|
| + return profile;
|
| +}
|
| +
|
| void TestingProfileManager::DeleteTestingProfile(const std::string& name) {
|
| DCHECK(called_set_up_);
|
|
|
| @@ -170,6 +189,16 @@ void TestingProfileManager::DeleteGuestProfile() {
|
| profile_manager_->profiles_info_.erase(ProfileManager::GetGuestProfilePath());
|
| }
|
|
|
| +void TestingProfileManager::DeleteSystemProfile() {
|
| + DCHECK(called_set_up_);
|
| +
|
| + TestingProfilesMap::iterator it = testing_profiles_.find(kSystemProfileName);
|
| + DCHECK(it != testing_profiles_.end());
|
| +
|
| + profile_manager_->profiles_info_.erase(
|
| + ProfileManager::GetSystemProfilePath());
|
| +}
|
| +
|
| void TestingProfileManager::DeleteProfileInfoCache() {
|
| profile_manager_->profile_info_cache_.reset(NULL);
|
| }
|
|
|