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

Unified Diff: components/sync/engine_impl/net/server_connection_manager.h

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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
« no previous file with comments | « components/sync/engine_impl/net/DEPS ('k') | components/sync/engine_impl/net/server_connection_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/engine_impl/net/server_connection_manager.h
diff --git a/sync/engine/net/server_connection_manager.h b/components/sync/engine_impl/net/server_connection_manager.h
similarity index 92%
rename from sync/engine/net/server_connection_manager.h
rename to components/sync/engine_impl/net/server_connection_manager.h
index 8d3028c20c754477c0c582a2161aed510acd0b81..ba35d1d9013734cf165fdd5772ef1cedc87da6eb 100644
--- a/sync/engine/net/server_connection_manager.h
+++ b/components/sync/engine_impl/net/server_connection_manager.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_
-#define SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_
+#ifndef COMPONENTS_SYNC_ENGINE_IMPL_NET_SERVER_CONNECTION_MANAGER_H_
+#define COMPONENTS_SYNC_ENGINE_IMPL_NET_SERVER_CONNECTION_MANAGER_H_
#include <stdint.h>
@@ -18,9 +18,9 @@
#include "base/synchronization/lock.h"
#include "base/threading/non_thread_safe.h"
#include "base/threading/thread_checker.h"
-#include "sync/base/sync_export.h"
-#include "sync/internal_api/public/base/cancelation_observer.h"
-#include "sync/syncable/syncable_id.h"
+#include "components/sync/base/cancelation_observer.h"
+#include "components/sync/base/sync_export.h"
+#include "components/sync/syncable/syncable_id.h"
namespace sync_pb {
class ClientToServerMessage;
@@ -89,19 +89,19 @@ struct SYNC_EXPORT HttpResponse {
HttpResponse();
- static const char* GetServerConnectionCodeString(
- ServerConnectionCode code);
+ static const char* GetServerConnectionCodeString(ServerConnectionCode code);
};
struct ServerConnectionEvent {
HttpResponse::ServerConnectionCode connection_code;
- explicit ServerConnectionEvent(HttpResponse::ServerConnectionCode code) :
- connection_code(code) {}
+ explicit ServerConnectionEvent(HttpResponse::ServerConnectionCode code)
+ : connection_code(code) {}
};
class SYNC_EXPORT ServerConnectionEventListener {
public:
virtual void OnServerConnectionEvent(const ServerConnectionEvent& event) = 0;
+
protected:
virtual ~ServerConnectionEventListener() {}
};
@@ -137,7 +137,8 @@ class SYNC_EXPORT ServerConnectionManager : public CancelationObserver {
// in Init.
virtual void Abort() = 0;
- bool ReadBufferResponse(std::string* buffer_out, HttpResponse* response,
+ bool ReadBufferResponse(std::string* buffer_out,
+ HttpResponse* response,
bool require_response);
bool ReadDownloadResponse(HttpResponse* response, std::string* buffer_out);
@@ -203,9 +204,7 @@ class SYNC_EXPORT ServerConnectionManager : public CancelationObserver {
// Sets a new auth token and time.
bool SetAuthToken(const std::string& auth_token);
- bool HasInvalidAuthToken() {
- return auth_token_.empty();
- }
+ bool HasInvalidAuthToken() { return auth_token_.empty(); }
const std::string auth_token() const {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -213,9 +212,7 @@ class SYNC_EXPORT ServerConnectionManager : public CancelationObserver {
}
protected:
- inline std::string proto_sync_path() const {
- return proto_sync_path_;
- }
+ inline std::string proto_sync_path() const { return proto_sync_path_; }
// Updates server_status_ and notifies listeners if server_status_ changed
void SetServerStatus(HttpResponse::ServerConnectionCode server_status);
@@ -291,6 +288,7 @@ class SYNC_EXPORT ServerConnectionManager : public CancelationObserver {
Connection* connection);
~ScopedConnectionHelper();
Connection* get();
+
private:
ServerConnectionManager* manager_;
std::unique_ptr<Connection> connection_;
@@ -309,4 +307,4 @@ std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr);
} // namespace syncer
-#endif // SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_
+#endif // COMPONENTS_SYNC_ENGINE_IMPL_NET_SERVER_CONNECTION_MANAGER_H_
« no previous file with comments | « components/sync/engine_impl/net/DEPS ('k') | components/sync/engine_impl/net/server_connection_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698