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

Side by Side Diff: components/sync/engine_impl/loopback_server/loopback_connection_manager.h

Issue 2360703002: [Sync] Implements the loopback sync server. (Closed)
Patch Set: Shuffle and rename stuff around. 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 unified diff | Download patch
OLDNEW
(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
5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_LOOPBACK_SERVER_LOOPBACK_CONNECTION_MANAGER_ H_
6 #define COMPONENTS_SYNC_ENGINE_IMPL_LOOPBACK_SERVER_LOOPBACK_CONNECTION_MANAGER_ H_
7
8 #include <string>
9
10 #include "components/sync/engine_impl/loopback_server/loopback_server.h"
11 #include "components/sync/engine_impl/net/server_connection_manager.h"
12
13 namespace syncer {
14
15 // This class implements the ServerConnectionManager interface for a local
16 // in-memory virtual connection to the LoopbackServer. Since there is no network
17 // connection to be established we only have to handle POSTs and they will
18 // always succeed.
19 class LoopbackConnectionManager : public ServerConnectionManager {
pavely 2016/10/06 23:48:45 In today's code we don't have a way to inject serv
pastarmovj 2016/10/13 14:13:39 I was planning on conditionally creating one or th
20 public:
21 LoopbackConnectionManager(CancelationSignal* signal,
22 const base::FilePath& persistent_file);
23 ~LoopbackConnectionManager() override;
24
25 private:
26 // Overridden ServerConnectionManager functions.
27 bool PostBufferToPath(PostBufferParams* params,
28 const std::string& path,
29 const std::string& auth_token) override;
30
31 // The loopback server that will handle the requests locally.
32 LoopbackServer loopback_server_;
33
34 DISALLOW_COPY_AND_ASSIGN(LoopbackConnectionManager);
35 };
36
37 } // namespace syncer
38
39 #endif // COMPONENTS_SYNC_ENGINE_IMPL_LOOPBACK_SERVER_LOOPBACK_CONNECTION_MANAG ER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698