Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: components/sync/engine_impl/net/sync_server_connection_manager.cc

Issue 2408463002: [Sync] Move network-related code from core/ to engine/net/. (Closed)
Patch Set: Use SyncServerConnectionManager instead of ServerConnectionManagerImpl. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/sync/engine_impl/net/sync_server_connection_manager.cc
diff --git a/components/sync/core_impl/syncapi_server_connection_manager.cc b/components/sync/engine_impl/net/sync_server_connection_manager.cc
similarity index 73%
rename from components/sync/core_impl/syncapi_server_connection_manager.cc
rename to components/sync/engine_impl/net/sync_server_connection_manager.cc
index d2833334f93624754b0103a2f5ca5d47d1d80999..6e96550bb728e6d6942971f4e11873a7de1f4296 100644
--- a/components/sync/core_impl/syncapi_server_connection_manager.cc
+++ b/components/sync/engine_impl/net/sync_server_connection_manager.cc
@@ -2,34 +2,33 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/sync/core_impl/syncapi_server_connection_manager.h"
+#include "components/sync/engine_impl/net/sync_server_connection_manager.h"
#include <stdint.h>
-#include "components/sync/core/http_post_provider_factory.h"
-#include "components/sync/core/http_post_provider_interface.h"
+#include "components/sync/engine/net/http_post_provider_factory.h"
+#include "components/sync/engine/net/http_post_provider_interface.h"
#include "net/base/net_errors.h"
#include "net/http/http_status_code.h"
namespace syncer {
-SyncAPIBridgedConnection::SyncAPIBridgedConnection(
- ServerConnectionManager* scm,
- HttpPostProviderFactory* factory)
+SyncBridgedConnection::SyncBridgedConnection(ServerConnectionManager* scm,
+ HttpPostProviderFactory* factory)
: Connection(scm), factory_(factory) {
post_provider_ = factory_->Create();
}
-SyncAPIBridgedConnection::~SyncAPIBridgedConnection() {
+SyncBridgedConnection::~SyncBridgedConnection() {
DCHECK(post_provider_);
factory_->Destroy(post_provider_);
post_provider_ = NULL;
}
-bool SyncAPIBridgedConnection::Init(const char* path,
- const std::string& auth_token,
- const std::string& payload,
- HttpResponse* response) {
+bool SyncBridgedConnection::Init(const char* path,
+ const std::string& auth_token,
+ const std::string& payload,
+ HttpResponse* response) {
std::string sync_server;
int sync_server_port = 0;
bool use_ssl = false;
@@ -77,12 +76,12 @@ bool SyncAPIBridgedConnection::Init(const char* path,
return true;
}
-void SyncAPIBridgedConnection::Abort() {
+void SyncBridgedConnection::Abort() {
DCHECK(post_provider_);
post_provider_->Abort();
}
-SyncAPIServerConnectionManager::SyncAPIServerConnectionManager(
+SyncServerConnectionManager::SyncServerConnectionManager(
const std::string& server,
int port,
bool use_ssl,
@@ -93,11 +92,11 @@ SyncAPIServerConnectionManager::SyncAPIServerConnectionManager(
DCHECK(post_provider_factory_.get());
}
-SyncAPIServerConnectionManager::~SyncAPIServerConnectionManager() {}
+SyncServerConnectionManager::~SyncServerConnectionManager() {}
ServerConnectionManager::Connection*
-SyncAPIServerConnectionManager::MakeConnection() {
- return new SyncAPIBridgedConnection(this, post_provider_factory_.get());
+SyncServerConnectionManager::MakeConnection() {
+ return new SyncBridgedConnection(this, post_provider_factory_.get());
}
} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698