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

Side by Side Diff: chrome/test/base/testing_profile_manager.cc

Issue 1129293002: Fix the System Profile with extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove autogenerated actions Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator.cc ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/base/testing_profile_manager.h" 5 #include "chrome/test/base/testing_profile_manager.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/prefs/pref_service_syncable.h" 9 #include "chrome/browser/prefs/pref_service_syncable.h"
10 #include "chrome/browser/profiles/profile_info_cache.h" 10 #include "chrome/browser/profiles/profile_info_cache.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 builder.SetPath(ProfileManager::GetGuestProfilePath()); 123 builder.SetPath(ProfileManager::GetGuestProfilePath());
124 124
125 // Add the guest profile to the profile manager, but not to the info cache. 125 // Add the guest profile to the profile manager, but not to the info cache.
126 TestingProfile* profile = builder.Build().release(); 126 TestingProfile* profile = builder.Build().release();
127 profile->set_profile_name(kGuestProfileName); 127 profile->set_profile_name(kGuestProfileName);
128 128
129 // Set up a profile with an off the record profile. 129 // Set up a profile with an off the record profile.
130 TestingProfile::Builder().BuildIncognito(profile); 130 TestingProfile::Builder().BuildIncognito(profile);
131 131
132 profile_manager_->AddProfile(profile); // Takes ownership. 132 profile_manager_->AddProfile(profile); // Takes ownership.
133 profile_manager_->SetGuestProfilePrefs(profile); 133 profile_manager_->SetNonPersonalProfilePrefs(profile);
134 134
135 testing_profiles_.insert(std::make_pair(kGuestProfileName, profile)); 135 testing_profiles_.insert(std::make_pair(kGuestProfileName, profile));
136 136
137 return profile; 137 return profile;
138 } 138 }
139 139
140 TestingProfile* TestingProfileManager::CreateSystemProfile() { 140 TestingProfile* TestingProfileManager::CreateSystemProfile() {
141 DCHECK(called_set_up_); 141 DCHECK(called_set_up_);
142 142
143 // Create the profile and register it. 143 // Create the profile and register it.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // Set up the directory for profiles. 237 // Set up the directory for profiles.
238 ASSERT_TRUE(profiles_dir_.CreateUniqueTempDir()); 238 ASSERT_TRUE(profiles_dir_.CreateUniqueTempDir());
239 239
240 profile_manager_ = new testing::ProfileManager(profiles_dir_.path()); 240 profile_manager_ = new testing::ProfileManager(profiles_dir_.path());
241 browser_process_->SetProfileManager(profile_manager_); // Takes ownership. 241 browser_process_->SetProfileManager(profile_manager_); // Takes ownership.
242 242
243 profile_manager_->GetProfileInfoCache(). 243 profile_manager_->GetProfileInfoCache().
244 set_disable_avatar_download_for_testing(true); 244 set_disable_avatar_download_for_testing(true);
245 called_set_up_ = true; 245 called_set_up_ = true;
246 } 246 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator.cc ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698