fake_gcm_client_factory.cc 807 B

12345678910111213141516171819202122232425262728
  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. #include "components/gcm_driver/fake_gcm_client_factory.h"
  5. #include <memory>
  6. #include "base/task/sequenced_task_runner.h"
  7. #include "components/gcm_driver/gcm_client.h"
  8. namespace gcm {
  9. FakeGCMClientFactory::FakeGCMClientFactory(
  10. const scoped_refptr<base::SequencedTaskRunner>& ui_thread,
  11. const scoped_refptr<base::SequencedTaskRunner>& io_thread)
  12. : ui_thread_(ui_thread),
  13. io_thread_(io_thread) {
  14. }
  15. FakeGCMClientFactory::~FakeGCMClientFactory() {
  16. }
  17. std::unique_ptr<GCMClient> FakeGCMClientFactory::BuildInstance() {
  18. return std::unique_ptr<GCMClient>(new FakeGCMClient(ui_thread_, io_thread_));
  19. }
  20. } // namespace gcm