| 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(const std::string& user_agent) { } | 29 void FakeServerHttpPostProviderFactory::Init( |
| 30 const std::string& user_agent, |
| 31 const syncer::BindToTrackerCallback& bind_to_tracker_callback) {} |
| 30 | 32 |
| 31 HttpPostProviderInterface* FakeServerHttpPostProviderFactory::Create() { | 33 HttpPostProviderInterface* FakeServerHttpPostProviderFactory::Create() { |
| 32 FakeServerHttpPostProvider* http = | 34 FakeServerHttpPostProvider* http = |
| 33 new FakeServerHttpPostProvider(fake_server_, fake_server_task_runner_); | 35 new FakeServerHttpPostProvider(fake_server_, fake_server_task_runner_); |
| 34 http->AddRef(); | 36 http->AddRef(); |
| 35 return http; | 37 return http; |
| 36 } | 38 } |
| 37 | 39 |
| 38 void FakeServerHttpPostProviderFactory::Destroy( | 40 void FakeServerHttpPostProviderFactory::Destroy( |
| 39 HttpPostProviderInterface* http) { | 41 HttpPostProviderInterface* http) { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 112 |
| 111 const std::string FakeServerHttpPostProvider::GetResponseHeaderValue( | 113 const std::string FakeServerHttpPostProvider::GetResponseHeaderValue( |
| 112 const std::string& name) const { | 114 const std::string& name) const { |
| 113 return std::string(); | 115 return std::string(); |
| 114 } | 116 } |
| 115 | 117 |
| 116 void FakeServerHttpPostProvider::Abort() { | 118 void FakeServerHttpPostProvider::Abort() { |
| 117 } | 119 } |
| 118 | 120 |
| 119 } // namespace fake_server | 121 } // namespace fake_server |
| OLD | NEW |