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

Side by Side Diff: sync/engine/net/server_connection_manager.h

Issue 1553433002: [Sync] Sync should run canary cycle after any network related error (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android test Created 4 years, 11 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
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ 5 #ifndef SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_
6 #define SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ 6 #define SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <iosfwd> 10 #include <iosfwd>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // The size of a download request's payload. 84 // The size of a download request's payload.
85 int64_t payload_length; 85 int64_t payload_length;
86 86
87 // Identifies the type of failure, if any. 87 // Identifies the type of failure, if any.
88 ServerConnectionCode server_status; 88 ServerConnectionCode server_status;
89 89
90 HttpResponse(); 90 HttpResponse();
91 91
92 static const char* GetServerConnectionCodeString( 92 static const char* GetServerConnectionCodeString(
93 ServerConnectionCode code); 93 ServerConnectionCode code);
94
95 static ServerConnectionCode ServerConnectionCodeFromNetError(
96 int error_code);
97 }; 94 };
98 95
99 struct ServerConnectionEvent { 96 struct ServerConnectionEvent {
100 HttpResponse::ServerConnectionCode connection_code; 97 HttpResponse::ServerConnectionCode connection_code;
101 explicit ServerConnectionEvent(HttpResponse::ServerConnectionCode code) : 98 explicit ServerConnectionEvent(HttpResponse::ServerConnectionCode code) :
102 connection_code(code) {} 99 connection_code(code) {}
103 }; 100 };
104 101
105 class SYNC_EXPORT ServerConnectionEventListener { 102 class SYNC_EXPORT ServerConnectionEventListener {
106 public: 103 public:
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 bool signal_handler_registered_; 313 bool signal_handler_registered_;
317 314
318 DISALLOW_COPY_AND_ASSIGN(ServerConnectionManager); 315 DISALLOW_COPY_AND_ASSIGN(ServerConnectionManager);
319 }; 316 };
320 317
321 std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr); 318 std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr);
322 319
323 } // namespace syncer 320 } // namespace syncer
324 321
325 #endif // SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ 322 #endif // SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/engine/backoff_delay_provider_unittest.cc ('k') | sync/engine/net/server_connection_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698