summaryrefslogtreecommitdiffstats
path: root/components/gcm_driver/fake_gcm_client_factory.cc
blob: e592bec1db165fe3f96c09a0229879c08f96daf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// 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 "base/memory/scoped_ptr.h"
#include "base/sequenced_task_runner.h"
#include "components/gcm_driver/gcm_client.h"

namespace gcm {

FakeGCMClientFactory::FakeGCMClientFactory(
    FakeGCMClient::StartMode gcm_client_start_mode,
    const scoped_refptr<base::SequencedTaskRunner>& ui_thread,
    const scoped_refptr<base::SequencedTaskRunner>& io_thread)
    : gcm_client_start_mode_(gcm_client_start_mode),
      ui_thread_(ui_thread),
      io_thread_(io_thread) {
}

FakeGCMClientFactory::~FakeGCMClientFactory() {
}

scoped_ptr<GCMClient> FakeGCMClientFactory::BuildInstance() {
  return scoped_ptr<GCMClient>(new FakeGCMClient(
      gcm_client_start_mode_, ui_thread_, io_thread_));
}

}  // namespace gcm