ServiceWorker: Consolidate version manipulation functions in SWProviderContext
[chromium-blink-merge.git] / sync / test / fake_server / fake_server_network_resources.cc
blob4750230a1766f19996da6ac0c237b564c98c5a8c
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.
5 #include "sync/test/fake_server/fake_server_network_resources.h"
7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop.h"
9 #include "sync/internal_api/public/base/cancelation_signal.h"
10 #include "sync/internal_api/public/http_post_provider_factory.h"
11 #include "sync/internal_api/public/network_time_update_callback.h"
12 #include "sync/test/fake_server/fake_server.h"
13 #include "sync/test/fake_server/fake_server_http_post_provider.h"
15 using syncer::CancelationSignal;
16 using syncer::HttpPostProviderFactory;
17 using syncer::NetworkTimeUpdateCallback;
19 namespace fake_server {
21 FakeServerNetworkResources::FakeServerNetworkResources(FakeServer* fake_server)
22 : fake_server_(fake_server) { }
24 FakeServerNetworkResources::~FakeServerNetworkResources() {}
26 scoped_ptr<syncer::HttpPostProviderFactory>
27 FakeServerNetworkResources::GetHttpPostProviderFactory(
28 const scoped_refptr<net::URLRequestContextGetter>& baseline_context_getter,
29 const NetworkTimeUpdateCallback& network_time_update_callback,
30 CancelationSignal* cancelation_signal) {
31 return make_scoped_ptr<syncer::HttpPostProviderFactory>(
32 new FakeServerHttpPostProviderFactory(
33 fake_server_,
34 base::MessageLoop::current()->message_loop_proxy()));
37 } // namespace fake_server