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

Remove deprecated method of TestChromeBrowserState

Two overloads of TestChromeBrowserState::AddTestingFactory
were introduced to prevent downstream tree while landing CL
https://crrev.com/c/1235718.

Remove them as the downstream tree has been ported to the
new API.

Bug: 809610
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: I802f40e3a31ccb306fb08a1d8256ac12674b8702
Reviewed-on: https://chromium-review.googlesource.com/1248703Reviewed-by: default avatarOlivier Robin <olivierrobin@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595016}
parent c0715d30
...@@ -103,17 +103,6 @@ class TestChromeBrowserState : public ios::ChromeBrowserState { ...@@ -103,17 +103,6 @@ class TestChromeBrowserState : public ios::ChromeBrowserState {
RefcountedBrowserStateKeyedServiceFactory::TestingFactory RefcountedBrowserStateKeyedServiceFactory::TestingFactory
testing_factory); testing_factory);
// Deprecated, do not use. This is kept for compatibility with downstream
// code and will be removed as soon as the downstream code has been fixed
// to use the new interface.
void AddTestingFactory(
BrowserStateKeyedServiceFactory* service_factory,
std::unique_ptr<KeyedService> (*testing_factory)(web::BrowserState*));
void AddTestingFactory(
RefcountedBrowserStateKeyedServiceFactory* service_factory,
scoped_refptr<RefcountedKeyedService> (*testing_factory)(
web::BrowserState*));
// Sets the path to the directory to be used to hold ChromeBrowserState // Sets the path to the directory to be used to hold ChromeBrowserState
// data. // data.
void SetPath(const base::FilePath& path); void SetPath(const base::FilePath& path);
......
...@@ -377,25 +377,6 @@ void TestChromeBrowserState::Builder::AddTestingFactory( ...@@ -377,25 +377,6 @@ void TestChromeBrowserState::Builder::AddTestingFactory(
std::move(testing_factory)); std::move(testing_factory));
} }
void TestChromeBrowserState::Builder::AddTestingFactory(
BrowserStateKeyedServiceFactory* service_factory,
std::unique_ptr<KeyedService> (*testing_factory)(web::BrowserState*)) {
BrowserStateKeyedServiceFactory::TestingFactory wrapped_factory;
if (testing_factory)
wrapped_factory = base::BindRepeating(testing_factory);
AddTestingFactory(service_factory, std::move(wrapped_factory));
}
void TestChromeBrowserState::Builder::AddTestingFactory(
RefcountedBrowserStateKeyedServiceFactory* service_factory,
scoped_refptr<RefcountedKeyedService> (*testing_factory)(
web::BrowserState*)) {
RefcountedBrowserStateKeyedServiceFactory::TestingFactory wrapped_factory;
if (testing_factory)
wrapped_factory = base::BindRepeating(testing_factory);
AddTestingFactory(service_factory, std::move(wrapped_factory));
}
void TestChromeBrowserState::Builder::SetPath(const base::FilePath& path) { void TestChromeBrowserState::Builder::SetPath(const base::FilePath& path) {
DCHECK(!build_called_); DCHECK(!build_called_);
state_path_ = path; state_path_ = path;
......
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