summaryrefslogtreecommitdiff
path: root/chromium/components/gcm_driver/fake_gcm_client_factory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/gcm_driver/fake_gcm_client_factory.cc')
-rw-r--r--chromium/components/gcm_driver/fake_gcm_client_factory.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/chromium/components/gcm_driver/fake_gcm_client_factory.cc b/chromium/components/gcm_driver/fake_gcm_client_factory.cc
new file mode 100644
index 00000000000..78f6ff1cd06
--- /dev/null
+++ b/chromium/components/gcm_driver/fake_gcm_client_factory.cc
@@ -0,0 +1,28 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/gcm_driver/fake_gcm_client_factory.h"
+
+#include <memory>
+
+#include "base/task/sequenced_task_runner.h"
+#include "components/gcm_driver/gcm_client.h"
+
+namespace gcm {
+
+FakeGCMClientFactory::FakeGCMClientFactory(
+ const scoped_refptr<base::SequencedTaskRunner>& ui_thread,
+ const scoped_refptr<base::SequencedTaskRunner>& io_thread)
+ : ui_thread_(ui_thread),
+ io_thread_(io_thread) {
+}
+
+FakeGCMClientFactory::~FakeGCMClientFactory() {
+}
+
+std::unique_ptr<GCMClient> FakeGCMClientFactory::BuildInstance() {
+ return std::unique_ptr<GCMClient>(new FakeGCMClient(ui_thread_, io_thread_));
+}
+
+} // namespace gcm