gcm_client_factory.h 786 B

123456789101112131415161718192021222324252627282930
  1. // Copyright (c) 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.
  4. #ifndef COMPONENTS_GCM_DRIVER_GCM_CLIENT_FACTORY_H_
  5. #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_FACTORY_H_
  6. #include <memory>
  7. namespace gcm {
  8. class GCMClient;
  9. class GCMClientFactory {
  10. public:
  11. GCMClientFactory();
  12. GCMClientFactory(const GCMClientFactory&) = delete;
  13. GCMClientFactory& operator=(const GCMClientFactory&) = delete;
  14. virtual ~GCMClientFactory();
  15. // Creates a new instance of GCMClient. The testing code could override this
  16. // to provide a mocked instance.
  17. virtual std::unique_ptr<GCMClient> BuildInstance();
  18. };
  19. } // namespace gcm
  20. #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_FACTORY_H_