Add an Android specific ChildAccountInfoFetcher that talks to the AccountManager.
[chromium-blink-merge.git] / components / signin / core / browser / child_account_info_fetcher.h
blob90dfaed2a9cefe930d262d539678b134d125a63e
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_CHILD_ACCOUNT_INFO_FETCHER_H_
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_CHILD_ACCOUNT_INFO_FETCHER_H_
8 #include <string>
10 #if defined(OS_ANDROID)
11 #include <jni.h>
12 #endif
14 namespace invalidation {
15 class InvalidationService;
17 namespace net {
18 class URLRequestContextGetter;
20 class AccountFetcherService;
21 class OAuth2TokenService;
23 class ChildAccountInfoFetcher {
24 public:
25 // Caller takes ownership of the fetcher and keeps it alive in order to
26 // receive updates except on Android where the return value is a nullptr
27 // and there are no updates due to a stale OS cache.
28 static ChildAccountInfoFetcher* CreateFrom(
29 const std::string& account_id,
30 AccountFetcherService* fetcher_service,
31 OAuth2TokenService* token_service,
32 net::URLRequestContextGetter* request_context_getter,
33 invalidation::InvalidationService* invalidation_service);
34 virtual ~ChildAccountInfoFetcher();
37 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_CHILD_ACCOUNT_INFO_FETCHER_H_