blob: f5891f5c97f7affc4bcebbeb840b17b9bb440faa [file] [log] [blame]
// 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 COMPONENTS_SIGNIN_CORE_BROWSER_CHILD_ACCOUNT_INFO_FETCHER_H_
#define COMPONENTS_SIGNIN_CORE_BROWSER_CHILD_ACCOUNT_INFO_FETCHER_H_
#include <memory>
#include <string>
#include "base/memory/ref_counted.h"
#include "build/build_config.h"
#if defined(OS_ANDROID)
#include <jni.h>
#endif
namespace invalidation {
class InvalidationService;
}
namespace network {
class SharedURLLoaderFactory;
}
class AccountFetcherService;
class OAuth2TokenService;
class ChildAccountInfoFetcher {
public:
// Caller takes ownership of the fetcher and keeps it alive in order to
// receive updates.
static std::unique_ptr<ChildAccountInfoFetcher> CreateFrom(
const std::string& account_id,
AccountFetcherService* fetcher_service,
OAuth2TokenService* token_service,
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
invalidation::InvalidationService* invalidation_service);
virtual ~ChildAccountInfoFetcher();
static void InitializeForTests();
};
#endif // COMPONENTS_SIGNIN_CORE_BROWSER_CHILD_ACCOUNT_INFO_FETCHER_H_