Chromium Code Reviews| Index: chrome/browser/signin/fake_gaia_cookie_manager_service.h |
| diff --git a/chrome/browser/signin/fake_gaia_cookie_manager_service.h b/chrome/browser/signin/fake_gaia_cookie_manager_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6c6e05defe15fee7094876d96f8dfe249e6d8629 |
| --- /dev/null |
| +++ b/chrome/browser/signin/fake_gaia_cookie_manager_service.h |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| +#ifndef CHROME_BROWSER_SIGNIN_FAKE_GAIA_COOKIE_MANAGER_SERVICE_H_ |
| +#define CHROME_BROWSER_SIGNIN_FAKE_GAIA_COOKIE_MANAGER_SERVICE_H_ |
| + |
| +#include "components/signin/core/browser/gaia_cookie_manager_service.h" |
| + |
| +#include "net/url_request/test_url_fetcher_factory.h" |
| + |
| +namespace content { |
| +class BrowserContext; |
| +} |
| + |
| +class FakeGaiaCookieManagerService : public GaiaCookieManagerService { |
| + public: |
| + FakeGaiaCookieManagerService(OAuth2TokenService* token_service, |
| + const std::string& source, |
| + SigninClient* client); |
| + |
| + // Helper function to be used with KeyedService::SetTestingFactory(). |
| + static KeyedService* Build(content::BrowserContext* context); |
| + |
| + private: |
| + // Provide a fake response for calls to /ListAccounts. |
| + net::FakeURLFetcherFactory url_fetcher_factory_; |
|
Roger Tawa OOO till Jul 10th
2015/04/15 18:51:05
I think it would be better to keep this member out
Mike Lerman
2015/04/16 13:13:46
Good point. I'll accept a FakeURLFetcherFactory as
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(FakeGaiaCookieManagerService); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_SIGNIN_FAKE_GAIA_COOKIE_MANAGER_SERVICE_H_ |