#include "chrome/browser/gcm/gcm_profile_service_factory.h"
#include <memory>
#include "base/functional/bind.h"
#include "base/no_destructor.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_key.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "components/gcm_driver/gcm_profile_service.h"
#include "components/offline_pages/buildflags/buildflags.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/network_service_instance.h"
#include "content/public/browser/storage_partition.h"
#include "services/network/public/mojom/network_context.mojom.h"
#if !BUILDFLAG(IS_ANDROID)
#include "chrome/browser/gcm/gcm_product_util.h"
#include "chrome/common/channel_info.h"
#include "components/gcm_driver/gcm_client_factory.h"
#include "content/public/browser/browser_context.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#endif
#if BUILDFLAG(ENABLE_OFFLINE_PAGES)
#include "chrome/browser/image_fetcher/image_fetcher_service_factory.h"
#endif
namespace gcm {
namespace {
#if !BUILDFLAG(IS_ANDROID)
void RequestProxyResolvingSocketFactoryOnUIThread(
base::WeakPtr<Profile> profile,
base::WeakPtr<GCMProfileService> service,
mojo::PendingReceiver<network::mojom::ProxyResolvingSocketFactory>
receiver) { … }
void RequestProxyResolvingSocketFactory(
base::WeakPtr<Profile> profile,
base::WeakPtr<GCMProfileService> service,
mojo::PendingReceiver<network::mojom::ProxyResolvingSocketFactory>
receiver) { … }
#endif
GCMProfileServiceFactory::GlobalTestingFactory& GetTestingFactory() { … }
}
GCMProfileServiceFactory::ScopedTestingFactoryInstaller::
ScopedTestingFactoryInstaller(GlobalTestingFactory testing_factory) { … }
GCMProfileServiceFactory::ScopedTestingFactoryInstaller::
~ScopedTestingFactoryInstaller() { … }
GCMProfileService* GCMProfileServiceFactory::GetForProfile(
content::BrowserContext* profile) { … }
GCMProfileServiceFactory* GCMProfileServiceFactory::GetInstance() { … }
GCMProfileServiceFactory::GCMProfileServiceFactory()
: … { … }
GCMProfileServiceFactory::~GCMProfileServiceFactory() { … }
KeyedService* GCMProfileServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const { … }
}