| Index: components/sync/engine_impl/net/loopback_connection_manager.cc
|
| diff --git a/components/sync/engine_impl/net/loopback_connection_manager.cc b/components/sync/engine_impl/net/loopback_connection_manager.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e067d01f5f472687e0f7ce91f8fbcdad5ac74d36
|
| --- /dev/null
|
| +++ b/components/sync/engine_impl/net/loopback_connection_manager.cc
|
| @@ -0,0 +1,31 @@
|
| +// Copyright 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +#include "components/sync/engine_impl/net/loopback_connection_manager.h"
|
| +
|
| +#include <string>
|
| +
|
| +#include "components/sync/syncable/directory.h"
|
| +
|
| +namespace syncer {
|
| +
|
| +LoopbackConnectionManager::LoopbackConnectionManager(
|
| + syncable::Directory* directory, CancelationSignal* signal)
|
| + : ServerConnectionManager("loopback", 0, false, signal) {
|
| +}
|
| +
|
| +LoopbackConnectionManager::~LoopbackConnectionManager() {
|
| +}
|
| +
|
| +bool LoopbackConnectionManager::PostBufferToPath(
|
| + PostBufferParams* params,
|
| + const std::string& path,
|
| + const std::string& auth_token) {
|
| + loopback_server_.HandleCommand(params->buffer_in,
|
| + ¶ms->response.server_status,
|
| + ¶ms->response.response_code,
|
| + ¶ms->buffer_out);
|
| + return params->response.server_status == HttpResponse::SERVER_CONNECTION_OK;
|
| +}
|
| +
|
| +} // namespace syncer
|
|
|