OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "sync/test/fake_server/fake_server_http_post_provider.h" | 5 #include "sync/test/fake_server/fake_server_http_post_provider.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/sequenced_task_runner.h" | 13 #include "base/sequenced_task_runner.h" |
14 #include "base/synchronization/waitable_event.h" | 14 #include "base/synchronization/waitable_event.h" |
15 #include "sync/test/fake_server/fake_server.h" | 15 #include "sync/test/fake_server/fake_server.h" |
16 | 16 |
17 using syncer::HttpPostProviderInterface; | 17 using syncer::HttpPostProviderInterface; |
18 | 18 |
19 namespace fake_server { | 19 namespace fake_server { |
20 | 20 |
21 FakeServerHttpPostProviderFactory::FakeServerHttpPostProviderFactory( | 21 FakeServerHttpPostProviderFactory::FakeServerHttpPostProviderFactory( |
22 const base::WeakPtr<FakeServer>& fake_server, | 22 const base::WeakPtr<FakeServer>& fake_server, |
23 scoped_refptr<base::SequencedTaskRunner> fake_server_task_runner) | 23 scoped_refptr<base::SequencedTaskRunner> fake_server_task_runner) |
24 : fake_server_(fake_server), | 24 : fake_server_(fake_server), |
25 fake_server_task_runner_(fake_server_task_runner) { } | 25 fake_server_task_runner_(fake_server_task_runner) { } |
26 | 26 |
27 FakeServerHttpPostProviderFactory::~FakeServerHttpPostProviderFactory() { } | 27 FakeServerHttpPostProviderFactory::~FakeServerHttpPostProviderFactory() { } |
28 | 28 |
29 void FakeServerHttpPostProviderFactory::Init( | 29 void FakeServerHttpPostProviderFactory::Init(const std::string& user_agent) { } |
30 const std::string& user_agent, | |
31 const syncer::BindToTrackerCallback& bind_to_tracker_callback) {} | |
32 | 30 |
33 HttpPostProviderInterface* FakeServerHttpPostProviderFactory::Create() { | 31 HttpPostProviderInterface* FakeServerHttpPostProviderFactory::Create() { |
34 FakeServerHttpPostProvider* http = | 32 FakeServerHttpPostProvider* http = |
35 new FakeServerHttpPostProvider(fake_server_, fake_server_task_runner_); | 33 new FakeServerHttpPostProvider(fake_server_, fake_server_task_runner_); |
36 http->AddRef(); | 34 http->AddRef(); |
37 return http; | 35 return http; |
38 } | 36 } |
39 | 37 |
40 void FakeServerHttpPostProviderFactory::Destroy( | 38 void FakeServerHttpPostProviderFactory::Destroy( |
41 HttpPostProviderInterface* http) { | 39 HttpPostProviderInterface* http) { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 110 |
113 const std::string FakeServerHttpPostProvider::GetResponseHeaderValue( | 111 const std::string FakeServerHttpPostProvider::GetResponseHeaderValue( |
114 const std::string& name) const { | 112 const std::string& name) const { |
115 return std::string(); | 113 return std::string(); |
116 } | 114 } |
117 | 115 |
118 void FakeServerHttpPostProvider::Abort() { | 116 void FakeServerHttpPostProvider::Abort() { |
119 } | 117 } |
120 | 118 |
121 } // namespace fake_server | 119 } // namespace fake_server |
OLD | NEW |