Skip to content

Commit

Permalink
Remove TestSigninClient's reference to SharedURLLoaderFactory instance
Browse files Browse the repository at this point in the history
We can simply call TestURLLoaderFactory::GetSafeWeakWrapper as needed.

BUG=None

Change-Id: Id11b4942efc4b786433ae7def80f2c6374352c61
Reviewed-on: https://chromium-review.googlesource.com/c/1468204
Reviewed-by: David Roger <droger@chromium.org>
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#631757}
  • Loading branch information
tonikitoo authored and Commit Bot committed Feb 13, 2019
1 parent 60638e7 commit ae026e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 2 additions & 5 deletions components/signin/core/browser/test_signin_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
#include "testing/gtest/include/gtest/gtest.h"

TestSigninClient::TestSigninClient(PrefService* pref_service)
: shared_factory_(
base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
&test_url_loader_factory_)),
pref_service_(pref_service),
: pref_service_(pref_service),
are_signin_cookies_allowed_(true),
network_calls_delayed_(false),
is_signout_allowed_(true) {}
Expand All @@ -39,7 +36,7 @@ void TestSigninClient::PreSignOut(

scoped_refptr<network::SharedURLLoaderFactory>
TestSigninClient::GetURLLoaderFactory() {
return shared_factory_;
return test_url_loader_factory_.GetSafeWeakWrapper();
}

network::mojom::CookieManager* TestSigninClient::GetCookieManager() {
Expand Down
1 change: 0 additions & 1 deletion components/signin/core/browser/test_signin_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ class TestSigninClient : public SigninClient {

private:
network::TestURLLoaderFactory test_url_loader_factory_;
scoped_refptr<network::SharedURLLoaderFactory> shared_factory_;

PrefService* pref_service_;
std::unique_ptr<network::mojom::CookieManager> cookie_manager_;
Expand Down

0 comments on commit ae026e0

Please sign in to comment.