fake_gcm_client_factory.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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.
  4. #ifndef COMPONENTS_GCM_DRIVER_FAKE_GCM_CLIENT_FACTORY_H_
  5. #define COMPONENTS_GCM_DRIVER_FAKE_GCM_CLIENT_FACTORY_H_
  6. #include "base/compiler_specific.h"
  7. #include "components/gcm_driver/fake_gcm_client.h"
  8. #include "components/gcm_driver/gcm_client_factory.h"
  9. namespace base {
  10. class SequencedTaskRunner;
  11. }
  12. namespace gcm {
  13. class GCMClient;
  14. class FakeGCMClientFactory : public GCMClientFactory {
  15. public:
  16. FakeGCMClientFactory(
  17. const scoped_refptr<base::SequencedTaskRunner>& ui_thread,
  18. const scoped_refptr<base::SequencedTaskRunner>& io_thread);
  19. FakeGCMClientFactory(const FakeGCMClientFactory&) = delete;
  20. FakeGCMClientFactory& operator=(const FakeGCMClientFactory&) = delete;
  21. ~FakeGCMClientFactory() override;
  22. // GCMClientFactory:
  23. std::unique_ptr<GCMClient> BuildInstance() override;
  24. private:
  25. scoped_refptr<base::SequencedTaskRunner> ui_thread_;
  26. scoped_refptr<base::SequencedTaskRunner> io_thread_;
  27. };
  28. } // namespace gcm
  29. #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_CLIENT_FACTORY_H_