Commit 06e8826e authored by Maks Orlovich's avatar Maks Orlovich Committed by Commit Bot

SigninClient: remove no longer needed URLRequestContext wiring

Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I16776c61094689602525122d2c70a08481093443
Reviewed-on: https://chromium-review.googlesource.com/1148470
Commit-Queue: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: default avatarvitaliii <vitaliii@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584495}
parent 35264e31
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
#include "content/public/browser/storage_partition.h" #include "content/public/browser/storage_partition.h"
#include "google_apis/gaia/gaia_constants.h" #include "google_apis/gaia/gaia_constants.h"
#include "google_apis/gaia/gaia_urls.h" #include "google_apis/gaia/gaia_urls.h"
#include "net/url_request/url_request_context_getter.h"
#include "url/gurl.h" #include "url/gurl.h"
#if BUILDFLAG(ENABLE_SUPERVISED_USERS) #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
...@@ -116,10 +115,6 @@ void ChromeSigninClient::OnSignedOut() { ...@@ -116,10 +115,6 @@ void ChromeSigninClient::OnSignedOut() {
entry->SetIsSigninRequired(false); entry->SetIsSigninRequired(false);
} }
net::URLRequestContextGetter* ChromeSigninClient::GetURLRequestContext() {
return profile_->GetRequestContext();
}
scoped_refptr<network::SharedURLLoaderFactory> scoped_refptr<network::SharedURLLoaderFactory>
ChromeSigninClient::GetURLLoaderFactory() { ChromeSigninClient::GetURLLoaderFactory() {
if (url_loader_factory_for_testing_) if (url_loader_factory_for_testing_)
......
...@@ -47,7 +47,6 @@ class ChromeSigninClient ...@@ -47,7 +47,6 @@ class ChromeSigninClient
// SigninClient implementation. // SigninClient implementation.
PrefService* GetPrefs() override; PrefService* GetPrefs() override;
void OnSignedOut() override; void OnSignedOut() override;
net::URLRequestContextGetter* GetURLRequestContext() override;
scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override; scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override;
network::mojom::CookieManager* GetCookieManager() override; network::mojom::CookieManager* GetCookieManager() override;
bool IsFirstRun() const override; bool IsFirstRun() const override;
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include "content/public/test/test_browser_thread_bundle.h" #include "content/public/test/test_browser_thread_bundle.h"
#include "google_apis/gaia/fake_oauth2_token_service_delegate.h" #include "google_apis/gaia/fake_oauth2_token_service_delegate.h"
#include "google_apis/gaia/gaia_constants.h" #include "google_apis/gaia/gaia_constants.h"
#include "net/url_request/url_request_test_util.h"
#include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/public/cpp/shared_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h" #include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -119,8 +118,6 @@ class DiceResponseHandlerTest : public testing::Test, ...@@ -119,8 +118,6 @@ class DiceResponseHandlerTest : public testing::Test,
DiceResponseHandlerTest() DiceResponseHandlerTest()
: loop_(base::MessageLoop::TYPE_IO), // URLRequestContext requires IO. : loop_(base::MessageLoop::TYPE_IO), // URLRequestContext requires IO.
task_runner_(new base::TestMockTimeTaskRunner()), task_runner_(new base::TestMockTimeTaskRunner()),
request_context_getter_(
new net::TestURLRequestContextGetter(task_runner_)),
signin_client_(&pref_service_), signin_client_(&pref_service_),
token_service_(&pref_service_, token_service_(&pref_service_,
std::make_unique<FakeOAuth2TokenServiceDelegate>()), std::make_unique<FakeOAuth2TokenServiceDelegate>()),
...@@ -146,7 +143,6 @@ class DiceResponseHandlerTest : public testing::Test, ...@@ -146,7 +143,6 @@ class DiceResponseHandlerTest : public testing::Test,
loop_.SetTaskRunner(task_runner_); loop_.SetTaskRunner(task_runner_);
DCHECK_EQ(task_runner_, base::ThreadTaskRunnerHandle::Get()); DCHECK_EQ(task_runner_, base::ThreadTaskRunnerHandle::Get());
EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); EXPECT_TRUE(temp_dir_.CreateUniqueTempDir());
signin_client_.SetURLRequestContext(request_context_getter_.get());
AboutSigninInternals::RegisterPrefs(pref_service_.registry()); AboutSigninInternals::RegisterPrefs(pref_service_.registry());
AccountTrackerService::RegisterPrefs(pref_service_.registry()); AccountTrackerService::RegisterPrefs(pref_service_.registry());
SigninManager::RegisterProfilePrefs(pref_service_.registry()); SigninManager::RegisterProfilePrefs(pref_service_.registry());
...@@ -227,7 +223,6 @@ class DiceResponseHandlerTest : public testing::Test, ...@@ -227,7 +223,6 @@ class DiceResponseHandlerTest : public testing::Test,
base::MessageLoop loop_; base::MessageLoop loop_;
base::ScopedTempDir temp_dir_; base::ScopedTempDir temp_dir_;
scoped_refptr<base::TestMockTimeTaskRunner> task_runner_; scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
scoped_refptr<net::TestURLRequestContextGetter> request_context_getter_;
sync_preferences::TestingPrefServiceSyncable pref_service_; sync_preferences::TestingPrefServiceSyncable pref_service_;
DiceTestSigninClient signin_client_; DiceTestSigninClient signin_client_;
ProfileOAuth2TokenService token_service_; ProfileOAuth2TokenService token_service_;
......
...@@ -13,7 +13,9 @@ ...@@ -13,7 +13,9 @@
#include "base/files/scoped_temp_dir.h" #include "base/files/scoped_temp_dir.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "build/buildflag.h" #include "build/buildflag.h"
#include "components/os_crypt/os_crypt_mocker.h" #include "components/os_crypt/os_crypt_mocker.h"
...@@ -38,7 +40,6 @@ ...@@ -38,7 +40,6 @@
#include "google_apis/gaia/oauth2_access_token_consumer.h" #include "google_apis/gaia/oauth2_access_token_consumer.h"
#include "google_apis/gaia/oauth2_token_service_test_util.h" #include "google_apis/gaia/oauth2_token_service_test_util.h"
#include "net/http/http_status_code.h" #include "net/http/http_status_code.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/public/cpp/shared_url_loader_factory.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -106,8 +107,6 @@ class MutableProfileOAuth2TokenServiceDelegateTest ...@@ -106,8 +107,6 @@ class MutableProfileOAuth2TokenServiceDelegateTest
AccountTrackerService::MIGRATION_NOT_STARTED); AccountTrackerService::MIGRATION_NOT_STARTED);
SigninManagerBase::RegisterProfilePrefs(pref_service_.registry()); SigninManagerBase::RegisterProfilePrefs(pref_service_.registry());
client_.reset(new TestSigninClient(&pref_service_)); client_.reset(new TestSigninClient(&pref_service_));
client_->SetURLRequestContext(new net::TestURLRequestContextGetter(
base::ThreadTaskRunnerHandle::Get()));
client_->test_url_loader_factory()->AddResponse( client_->test_url_loader_factory()->AddResponse(
GaiaUrls::GetInstance()->oauth2_revoke_url().spec(), ""); GaiaUrls::GetInstance()->oauth2_revoke_url().spec(), "");
LoadTokenDatabase(); LoadTokenDatabase();
...@@ -950,7 +949,7 @@ TEST_F(MutableProfileOAuth2TokenServiceDelegateTest, RetryBackoff) { ...@@ -950,7 +949,7 @@ TEST_F(MutableProfileOAuth2TokenServiceDelegateTest, RetryBackoff) {
EXPECT_EQ(1, access_token_failure_count_); EXPECT_EQ(1, access_token_failure_count_);
// Expect a positive backoff time. // Expect a positive backoff time.
EXPECT_GT(oauth2_service_delegate_->backoff_entry_.GetTimeUntilRelease(), EXPECT_GT(oauth2_service_delegate_->backoff_entry_.GetTimeUntilRelease(),
TimeDelta()); base::TimeDelta());
// Pretend that backoff has expired and try again. // Pretend that backoff has expired and try again.
oauth2_service_delegate_->backoff_entry_.SetCustomReleaseTime( oauth2_service_delegate_->backoff_entry_.SetCustomReleaseTime(
......
...@@ -52,6 +52,10 @@ namespace base { ...@@ -52,6 +52,10 @@ namespace base {
class MessageLoop; class MessageLoop;
} }
namespace net {
class URLRequestContextGetter;
} // namespace net
namespace network { namespace network {
class SharedURLLoaderFactory; class SharedURLLoaderFactory;
} // namespace network } // namespace network
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/files/scoped_temp_dir.h" #include "base/files/scoped_temp_dir.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_task_environment.h" #include "base/test/scoped_task_environment.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "components/image_fetcher/core/image_data_fetcher.h" #include "components/image_fetcher/core/image_data_fetcher.h"
...@@ -292,8 +293,6 @@ class AccountTrackerServiceTest : public testing::Test { ...@@ -292,8 +293,6 @@ class AccountTrackerServiceTest : public testing::Test {
pref_service_.registry()->RegisterInt64Pref( pref_service_.registry()->RegisterInt64Pref(
AccountFetcherService::kLastUpdatePref, 0); AccountFetcherService::kLastUpdatePref, 0);
signin_client_.reset(new TestSigninClient(&pref_service_)); signin_client_.reset(new TestSigninClient(&pref_service_));
signin_client_->SetURLRequestContext(new net::TestURLRequestContextGetter(
scoped_task_environment_.GetMainThreadTaskRunner()));
account_tracker_.reset(new AccountTrackerService()); account_tracker_.reset(new AccountTrackerService());
account_tracker_->Initialize(signin_client_.get()); account_tracker_->Initialize(signin_client_.get());
......
...@@ -24,9 +24,6 @@ namespace content_settings { ...@@ -24,9 +24,6 @@ namespace content_settings {
class Observer; class Observer;
} }
namespace net {
class URLRequestContextGetter;
}
namespace network { namespace network {
class SharedURLLoaderFactory; class SharedURLLoaderFactory;
...@@ -35,10 +32,6 @@ class CookieManager; ...@@ -35,10 +32,6 @@ class CookieManager;
} }
} }
namespace network {
class SharedURLLoaderFactory;
}
// An interface that needs to be supplied to the Signin component by its // An interface that needs to be supplied to the Signin component by its
// embedder. // embedder.
class SigninClient : public KeyedService { class SigninClient : public KeyedService {
...@@ -61,10 +54,6 @@ class SigninClient : public KeyedService { ...@@ -61,10 +54,6 @@ class SigninClient : public KeyedService {
// Gets the preferences associated with the client. // Gets the preferences associated with the client.
virtual PrefService* GetPrefs() = 0; virtual PrefService* GetPrefs() = 0;
// Returns the URL request context information associated with the client.
// DEPRECATED, new code should be using GetURLLoaderFactory instead.
virtual net::URLRequestContextGetter* GetURLRequestContext() = 0;
// Returns the SharedURLLoaderFactory that should be used to fetch resources // Returns the SharedURLLoaderFactory that should be used to fetch resources
// associated with the client. // associated with the client.
virtual scoped_refptr<network::SharedURLLoaderFactory> virtual scoped_refptr<network::SharedURLLoaderFactory>
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
...@@ -31,9 +32,6 @@ ...@@ -31,9 +32,6 @@
#include "google_apis/gaia/gaia_constants.h" #include "google_apis/gaia/gaia_constants.h"
#include "google_apis/gaia/gaia_urls.h" #include "google_apis/gaia/gaia_urls.h"
#include "net/cookies/cookie_monster.h" #include "net/cookies/cookie_monster.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context_getter.h"
#include "net/url_request/url_request_status.h"
#include "testing/gmock/include/gmock/gmock.h" #include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -88,8 +86,6 @@ class SigninManagerTest : public testing::Test { ...@@ -88,8 +86,6 @@ class SigninManagerTest : public testing::Test {
GaiaConstants::kChromeSource, GaiaConstants::kChromeSource,
&test_signin_client_), &test_signin_client_),
account_consistency_(signin::AccountConsistencyMethod::kDisabled) { account_consistency_(signin::AccountConsistencyMethod::kDisabled) {
test_signin_client_.SetURLRequestContext(
new net::TestURLRequestContextGetter(loop_.task_runner()));
AccountFetcherService::RegisterPrefs(user_prefs_.registry()); AccountFetcherService::RegisterPrefs(user_prefs_.registry());
AccountTrackerService::RegisterPrefs(user_prefs_.registry()); AccountTrackerService::RegisterPrefs(user_prefs_.registry());
SigninManagerBase::RegisterProfilePrefs(user_prefs_.registry()); SigninManagerBase::RegisterProfilePrefs(user_prefs_.registry());
......
...@@ -36,10 +36,6 @@ void TestSigninClient::PostSignedIn(const std::string& account_id, ...@@ -36,10 +36,6 @@ void TestSigninClient::PostSignedIn(const std::string& account_id,
signed_in_password_ = password; signed_in_password_ = password;
} }
net::URLRequestContextGetter* TestSigninClient::GetURLRequestContext() {
return request_context_.get();
}
scoped_refptr<network::SharedURLLoaderFactory> scoped_refptr<network::SharedURLLoaderFactory>
TestSigninClient::GetURLLoaderFactory() { TestSigninClient::GetURLLoaderFactory() {
return shared_factory_; return shared_factory_;
...@@ -49,11 +45,6 @@ network::mojom::CookieManager* TestSigninClient::GetCookieManager() { ...@@ -49,11 +45,6 @@ network::mojom::CookieManager* TestSigninClient::GetCookieManager() {
return nullptr; return nullptr;
} }
void TestSigninClient::SetURLRequestContext(
net::URLRequestContextGetter* request_context) {
request_context_ = request_context;
}
std::string TestSigninClient::GetProductVersion() { return ""; } std::string TestSigninClient::GetProductVersion() { return ""; }
void TestSigninClient::SetNetworkCallsDelayed(bool value) { void TestSigninClient::SetNetworkCallsDelayed(bool value) {
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "components/signin/core/browser/signin_client.h" #include "components/signin/core/browser/signin_client.h"
#include "net/url_request/url_request_test_util.h"
#include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h" #include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/test/test_url_loader_factory.h" #include "services/network/test/test_url_loader_factory.h"
...@@ -51,16 +50,7 @@ class TestSigninClient : public SigninClient { ...@@ -51,16 +50,7 @@ class TestSigninClient : public SigninClient {
// Returns the empty string. // Returns the empty string.
std::string GetProductVersion() override; std::string GetProductVersion() override;
// Returns a manually provided URLRequestContextGetter. // Wraps the test_url_loader_factory().
net::URLRequestContextGetter* GetURLRequestContext() override;
// Tells GetURLRequestContext() what to return.
void SetURLRequestContext(net::URLRequestContextGetter* request_context);
// Wraps the test_url_loader_factory(). Note that this is totally independent
// of GetURLRequestContext(), so you may need to set some things differently
// based on what API the consumer is using, while transition away from
// URLRequestContextGetter is going on.
scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override; scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override;
// Returns nullptr. // Returns nullptr.
...@@ -97,7 +87,6 @@ class TestSigninClient : public SigninClient { ...@@ -97,7 +87,6 @@ class TestSigninClient : public SigninClient {
void PreGaiaLogout(base::OnceClosure callback) override; void PreGaiaLogout(base::OnceClosure callback) override;
private: private:
scoped_refptr<net::URLRequestContextGetter> request_context_;
network::TestURLLoaderFactory test_url_loader_factory_; network::TestURLLoaderFactory test_url_loader_factory_;
scoped_refptr<network::SharedURLLoaderFactory> shared_factory_; scoped_refptr<network::SharedURLLoaderFactory> shared_factory_;
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "components/signin/core/browser/signin_error_controller.h" #include "components/signin/core/browser/signin_error_controller.h"
#include "components/signin/ios/browser/wait_for_network_callback_helper.h" #include "components/signin/ios/browser/wait_for_network_callback_helper.h"
#include "net/cookies/cookie_change_dispatcher.h" #include "net/cookies/cookie_change_dispatcher.h"
#include "net/url_request/url_request_context_getter.h"
namespace ios { namespace ios {
class ChromeBrowserState; class ChromeBrowserState;
...@@ -48,7 +47,6 @@ class IOSChromeSigninClient : public SigninClient, ...@@ -48,7 +47,6 @@ class IOSChromeSigninClient : public SigninClient,
override; override;
void PreGaiaLogout(base::OnceClosure callback) override; void PreGaiaLogout(base::OnceClosure callback) override;
PrefService* GetPrefs() override; PrefService* GetPrefs() override;
net::URLRequestContextGetter* GetURLRequestContext() override;
scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override; scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override;
network::mojom::CookieManager* GetCookieManager() override; network::mojom::CookieManager* GetCookieManager() override;
void DoFinalInit() override; void DoFinalInit() override;
......
...@@ -93,10 +93,6 @@ PrefService* IOSChromeSigninClient::GetPrefs() { ...@@ -93,10 +93,6 @@ PrefService* IOSChromeSigninClient::GetPrefs() {
return browser_state_->GetPrefs(); return browser_state_->GetPrefs();
} }
net::URLRequestContextGetter* IOSChromeSigninClient::GetURLRequestContext() {
return browser_state_->GetRequestContext();
}
scoped_refptr<network::SharedURLLoaderFactory> scoped_refptr<network::SharedURLLoaderFactory>
IOSChromeSigninClient::GetURLLoaderFactory() { IOSChromeSigninClient::GetURLLoaderFactory() {
return browser_state_->GetSharedURLLoaderFactory(); return browser_state_->GetSharedURLLoaderFactory();
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "ios/chrome/browser/signin/signin_manager_factory.h" #include "ios/chrome/browser/signin/signin_manager_factory.h"
#include "ios/chrome/browser/sync/ios_chrome_sync_client.h" #include "ios/chrome/browser/sync/ios_chrome_sync_client.h"
#include "ios/chrome/common/channel_info.h" #include "ios/chrome/common/channel_info.h"
#include "net/url_request/url_request_context_getter.h"
#include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/public/cpp/shared_url_loader_factory.h"
browser_sync::ProfileSyncService::InitParams browser_sync::ProfileSyncService::InitParams
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "components/signin/core/browser/signin_error_controller.h" #include "components/signin/core/browser/signin_error_controller.h"
#include "components/signin/ios/browser/wait_for_network_callback_helper.h" #include "components/signin/ios/browser/wait_for_network_callback_helper.h"
#include "net/cookies/cookie_change_dispatcher.h" #include "net/cookies/cookie_change_dispatcher.h"
#include "net/url_request/url_request_context_getter.h"
#include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/public/cpp/shared_url_loader_factory.h"
// iOS WebView specific signin client. // iOS WebView specific signin client.
...@@ -23,7 +22,6 @@ class IOSWebViewSigninClient : public SigninClient, ...@@ -23,7 +22,6 @@ class IOSWebViewSigninClient : public SigninClient,
public: public:
IOSWebViewSigninClient( IOSWebViewSigninClient(
PrefService* pref_service, PrefService* pref_service,
net::URLRequestContextGetter* url_request_context,
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
network::mojom::CookieManager* cookie_manager, network::mojom::CookieManager* cookie_manager,
SigninErrorController* signin_error_controller, SigninErrorController* signin_error_controller,
...@@ -39,7 +37,6 @@ class IOSWebViewSigninClient : public SigninClient, ...@@ -39,7 +37,6 @@ class IOSWebViewSigninClient : public SigninClient,
std::string GetProductVersion() override; std::string GetProductVersion() override;
base::Time GetInstallDate() override; base::Time GetInstallDate() override;
PrefService* GetPrefs() override; PrefService* GetPrefs() override;
net::URLRequestContextGetter* GetURLRequestContext() override;
scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override; scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override;
network::mojom::CookieManager* GetCookieManager() override; network::mojom::CookieManager* GetCookieManager() override;
void DoFinalInit() override; void DoFinalInit() override;
...@@ -65,8 +62,6 @@ class IOSWebViewSigninClient : public SigninClient, ...@@ -65,8 +62,6 @@ class IOSWebViewSigninClient : public SigninClient,
std::unique_ptr<WaitForNetworkCallbackHelper> network_callback_helper_; std::unique_ptr<WaitForNetworkCallbackHelper> network_callback_helper_;
// The PrefService associated with this service. // The PrefService associated with this service.
PrefService* pref_service_; PrefService* pref_service_;
// The URLRequestContext associated with this service.
net::URLRequestContextGetter* url_request_context_;
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_;
network::mojom::CookieManager* cookie_manager_; network::mojom::CookieManager* cookie_manager_;
// Used to check for errors related to signing in. // Used to check for errors related to signing in.
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
IOSWebViewSigninClient::IOSWebViewSigninClient( IOSWebViewSigninClient::IOSWebViewSigninClient(
PrefService* pref_service, PrefService* pref_service,
net::URLRequestContextGetter* url_request_context,
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
network::mojom::CookieManager* cookie_manager, network::mojom::CookieManager* cookie_manager,
SigninErrorController* signin_error_controller, SigninErrorController* signin_error_controller,
...@@ -24,7 +23,6 @@ IOSWebViewSigninClient::IOSWebViewSigninClient( ...@@ -24,7 +23,6 @@ IOSWebViewSigninClient::IOSWebViewSigninClient(
: network_callback_helper_( : network_callback_helper_(
std::make_unique<WaitForNetworkCallbackHelper>()), std::make_unique<WaitForNetworkCallbackHelper>()),
pref_service_(pref_service), pref_service_(pref_service),
url_request_context_(url_request_context),
url_loader_factory_(url_loader_factory), url_loader_factory_(url_loader_factory),
cookie_manager_(cookie_manager), cookie_manager_(cookie_manager),
signin_error_controller_(signin_error_controller), signin_error_controller_(signin_error_controller),
...@@ -57,10 +55,6 @@ PrefService* IOSWebViewSigninClient::GetPrefs() { ...@@ -57,10 +55,6 @@ PrefService* IOSWebViewSigninClient::GetPrefs() {
return pref_service_; return pref_service_;
} }
net::URLRequestContextGetter* IOSWebViewSigninClient::GetURLRequestContext() {
return url_request_context_;
}
scoped_refptr<network::SharedURLLoaderFactory> scoped_refptr<network::SharedURLLoaderFactory>
IOSWebViewSigninClient::GetURLLoaderFactory() { IOSWebViewSigninClient::GetURLLoaderFactory() {
return url_loader_factory_; return url_loader_factory_;
......
...@@ -47,8 +47,7 @@ WebViewSigninClientFactory::BuildServiceInstanceFor( ...@@ -47,8 +47,7 @@ WebViewSigninClientFactory::BuildServiceInstanceFor(
WebViewBrowserState* browser_state = WebViewBrowserState* browser_state =
WebViewBrowserState::FromBrowserState(context); WebViewBrowserState::FromBrowserState(context);
return std::make_unique<IOSWebViewSigninClient>( return std::make_unique<IOSWebViewSigninClient>(
browser_state->GetPrefs(), browser_state->GetRequestContext(), browser_state->GetPrefs(), browser_state->GetSharedURLLoaderFactory(),
browser_state->GetSharedURLLoaderFactory(),
browser_state->GetCookieManager(), browser_state->GetCookieManager(),
WebViewSigninErrorControllerFactory::GetForBrowserState(browser_state), WebViewSigninErrorControllerFactory::GetForBrowserState(browser_state),
WebViewCookieSettingsFactory::GetForBrowserState(browser_state), WebViewCookieSettingsFactory::GetForBrowserState(browser_state),
......
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