Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / services / gcm / gcm_client_factory.h
blob1bed803b383294148570a8fbc0639a902f194f9e
1 // Copyright 2014 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 CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_FACTORY_H_
6 #define CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_FACTORY_H_
8 #include "base/macros.h"
10 class Profile;
12 namespace gcm {
14 class GCMClient;
16 class GCMClientFactory {
17 public:
18 // Returns a single instance of GCMClient.
19 // This should be called from IO thread.
20 static GCMClient* GetClient();
22 // Passes a mocked instance for testing purpose.
23 typedef GCMClient* (*TestingFactoryFunction)();
24 static void SetTestingFactory(TestingFactoryFunction factory);
26 private:
27 GCMClientFactory();
28 ~GCMClientFactory();
30 DISALLOW_COPY_AND_ASSIGN(GCMClientFactory);
33 } // namespace gcm
35 #endif // CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_FACTORY_H_