Commit a315cb64 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Remove unused method CocoaProfileTest::AddTestingFactories

The method is never invoked, so remove it.

Bug: none
Change-Id: Ib96cd1a7c34e4dce7ccf8ed9b1937ccb59ec987c
Reviewed-on: https://chromium-review.googlesource.com/1243483
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594688}
parent 7f40566c
......@@ -57,10 +57,6 @@ class CocoaProfileTest : public CocoaTest {
// test window.
virtual Browser* CreateBrowser();
// Define the TestingFactories to be used when SetUp() builds a Profile. To be
// called in the subclass' constructor.
void AddTestingFactories(TestingProfile::TestingFactories testing_factories);
private:
std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_;
......@@ -68,7 +64,6 @@ class CocoaProfileTest : public CocoaTest {
TestingProfileManager profile_manager_;
TestingProfile* profile_; // Weak; owned by profile_manager_.
TestingProfile::TestingFactories testing_factories_;
std::unique_ptr<Browser> browser_;
};
......
......@@ -50,27 +50,20 @@ CocoaProfileTest::~CocoaProfileTest() {
base::RunLoop().RunUntilIdle();
}
void CocoaProfileTest::AddTestingFactories(
TestingProfile::TestingFactories testing_factories) {
for (TestingProfile::TestingFactories::value_type& pair : testing_factories) {
testing_factories_.emplace_back(std::move(pair));
}
}
void CocoaProfileTest::SetUp() {
CocoaTest::SetUp();
ASSERT_TRUE(profile_manager_.SetUp());
// Always fake out the Gaia service to avoid issuing network requests.
testing_factories_.emplace_back(
GaiaCookieManagerServiceFactory::GetInstance(),
base::BindRepeating(&BuildFakeGaiaCookieManagerService));
TestingProfile::TestingFactories testing_factories = {
{GaiaCookieManagerServiceFactory::GetInstance(),
base::BindRepeating(&BuildFakeGaiaCookieManagerService)}};
profile_ = profile_manager_.CreateTestingProfile(
"Person 1", std::unique_ptr<sync_preferences::PrefServiceSyncable>(),
base::UTF8ToUTF16("Person 1"), 0, std::string(),
std::move(testing_factories_));
std::move(testing_factories));
ASSERT_TRUE(profile_);
// TODO(shess): These are needed in case someone creates a browser
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment