summaryrefslogtreecommitdiffstats
path: root/chrome/browser/signin/fake_profile_oauth2_token_service_builder.h
blob: 21672b662fc024efc78cecdbfd65adeee3f5ab71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2014 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_PROFILE_OAUTH2_TOKEN_SERVICE_BUILDER_H_
#define CHROME_BROWSER_SIGNIN_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_BUILDER_H_

class KeyedService;

namespace content {
class BrowserContext;
}

// Helper function to be used with
// BrowserContextKeyedServiceFactory::SetTestingFactory() that returns a
// FakeProfileOAuth2TokenService object.
KeyedService* BuildFakeProfileOAuth2TokenService(
    content::BrowserContext* context);

// Helper function to be used with
// BrowserContextKeyedServiceFactory::SetTestingFactory() that creates a
// FakeProfileOAuth2TokenService object that posts fetch responses on the
// current message loop.
KeyedService* BuildAutoIssuingFakeProfileOAuth2TokenService(
    content::BrowserContext* context);

#endif  // CHROME_BROWSER_SIGNIN_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_BUILDER_H_