| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/internal_api/syncapi_server_connection_manager.h" | 5 #include "components/sync/core_impl/syncapi_server_connection_manager.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "components/sync/core/http_post_provider_factory.h" |
| 10 #include "components/sync/core/http_post_provider_interface.h" |
| 9 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
| 10 #include "net/http/http_status_code.h" | 12 #include "net/http/http_status_code.h" |
| 11 #include "sync/internal_api/public/http_post_provider_factory.h" | |
| 12 #include "sync/internal_api/public/http_post_provider_interface.h" | |
| 13 | 13 |
| 14 namespace syncer { | 14 namespace syncer { |
| 15 | 15 |
| 16 SyncAPIBridgedConnection::SyncAPIBridgedConnection( | 16 SyncAPIBridgedConnection::SyncAPIBridgedConnection( |
| 17 ServerConnectionManager* scm, | 17 ServerConnectionManager* scm, |
| 18 HttpPostProviderFactory* factory) | 18 HttpPostProviderFactory* factory) |
| 19 : Connection(scm), factory_(factory) { | 19 : Connection(scm), factory_(factory) { |
| 20 post_provider_ = factory_->Create(); | 20 post_provider_ = factory_->Create(); |
| 21 } | 21 } |
| 22 | 22 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 DCHECK(post_provider_); | 81 DCHECK(post_provider_); |
| 82 post_provider_->Abort(); | 82 post_provider_->Abort(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 SyncAPIServerConnectionManager::SyncAPIServerConnectionManager( | 85 SyncAPIServerConnectionManager::SyncAPIServerConnectionManager( |
| 86 const std::string& server, | 86 const std::string& server, |
| 87 int port, | 87 int port, |
| 88 bool use_ssl, | 88 bool use_ssl, |
| 89 HttpPostProviderFactory* factory, | 89 HttpPostProviderFactory* factory, |
| 90 CancelationSignal* cancelation_signal) | 90 CancelationSignal* cancelation_signal) |
| 91 : ServerConnectionManager(server, | 91 : ServerConnectionManager(server, port, use_ssl, cancelation_signal), |
| 92 port, | |
| 93 use_ssl, | |
| 94 cancelation_signal), | |
| 95 post_provider_factory_(factory) { | 92 post_provider_factory_(factory) { |
| 96 DCHECK(post_provider_factory_.get()); | 93 DCHECK(post_provider_factory_.get()); |
| 97 } | 94 } |
| 98 | 95 |
| 99 SyncAPIServerConnectionManager::~SyncAPIServerConnectionManager() {} | 96 SyncAPIServerConnectionManager::~SyncAPIServerConnectionManager() {} |
| 100 | 97 |
| 101 ServerConnectionManager::Connection* | 98 ServerConnectionManager::Connection* |
| 102 SyncAPIServerConnectionManager::MakeConnection() { | 99 SyncAPIServerConnectionManager::MakeConnection() { |
| 103 return new SyncAPIBridgedConnection(this, post_provider_factory_.get()); | 100 return new SyncAPIBridgedConnection(this, post_provider_factory_.get()); |
| 104 } | 101 } |
| 105 | 102 |
| 106 } // namespace syncer | 103 } // namespace syncer |
| OLD | NEW |