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

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

Issue 59883010: This is the fourth CL of several that will eventually replace TokenService with (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change LOG(INFO) to VLOG(1) Created 7 years, 1 month 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/test/base/testing_profile_manager.h ('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_manager.cc
diff --git a/chrome/test/base/testing_profile_manager.cc b/chrome/test/base/testing_profile_manager.cc
index 15d7bbc9c58b046b5606d13c9fe1bc9840fe5148..048fbff3b1aa0660246f9d5c381bfa27b38d4cf2 100644
--- a/chrome/test/base/testing_profile_manager.cc
+++ b/chrome/test/base/testing_profile_manager.cc
@@ -11,7 +11,6 @@
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/test/base/testing_browser_process.h"
-#include "chrome/test/base/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace testing {
@@ -49,7 +48,8 @@ TestingProfile* TestingProfileManager::CreateTestingProfile(
scoped_ptr<PrefServiceSyncable> prefs,
const string16& user_name,
int avatar_id,
- const std::string& managed_user_id) {
+ const std::string& managed_user_id,
+ const TestingProfile::TestingFactories& factories) {
DCHECK(called_set_up_);
// Create a path for the profile based on the name.
@@ -62,6 +62,11 @@ TestingProfile* TestingProfileManager::CreateTestingProfile(
builder.SetPrefService(prefs.Pass());
builder.SetManagedUserId(managed_user_id);
+ for (TestingProfile::TestingFactories::const_iterator it = factories.begin();
+ it != factories.end(); ++it) {
+ builder.AddTestingFactory(it->first, it->second);
+ }
+
TestingProfile* profile = builder.Build().release();
profile->set_profile_name(profile_name);
profile_manager_->AddProfile(profile); // Takes ownership.
@@ -84,7 +89,8 @@ TestingProfile* TestingProfileManager::CreateTestingProfile(
const std::string& name) {
DCHECK(called_set_up_);
return CreateTestingProfile(name, scoped_ptr<PrefServiceSyncable>(),
- UTF8ToUTF16(name), 0, std::string());
+ UTF8ToUTF16(name), 0, std::string(),
+ TestingProfile::TestingFactories());
}
void TestingProfileManager::DeleteTestingProfile(const std::string& name) {
« no previous file with comments | « chrome/test/base/testing_profile_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698