Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 #include "components/sync/engine_impl/loopback_server/loopback_connection_manage r.h" | |
| 5 | |
| 6 #include <string> | |
| 7 | |
| 8 #include "components/sync/syncable/directory.h" | |
|
pavely
2016/10/06 23:48:45
I don't think you need directory.h here.
pastarmovj
2016/10/13 14:13:39
Done.
| |
| 9 | |
| 10 namespace syncer { | |
| 11 | |
| 12 LoopbackConnectionManager::LoopbackConnectionManager( | |
| 13 CancelationSignal* signal, | |
| 14 const base::FilePath& persistent_file) | |
| 15 : ServerConnectionManager("localhost", 0, false, signal), | |
| 16 loopback_server_(persistent_file) {} | |
| 17 | |
| 18 LoopbackConnectionManager::~LoopbackConnectionManager() {} | |
| 19 | |
| 20 bool LoopbackConnectionManager::PostBufferToPath( | |
| 21 PostBufferParams* params, | |
| 22 const std::string& path, | |
| 23 const std::string& auth_token) { | |
| 24 loopback_server_.HandleCommand( | |
| 25 params->buffer_in, ¶ms->response.server_status, | |
| 26 ¶ms->response.response_code, ¶ms->buffer_out); | |
| 27 return params->response.server_status == HttpResponse::SERVER_CONNECTION_OK; | |
| 28 } | |
| 29 | |
| 30 } // namespace syncer | |
| OLD | NEW |