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

Side by Side Diff: components/sync/engine_impl/net/server_connection_manager.cc

Issue 2681393002: [sync] SYNC_AUTH_ERROR in logs when running sync_integration_tests (Closed)
Patch Set: Removed "invalid" Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "components/sync/engine_impl/net/server_connection_manager.h" 5 #include "components/sync/engine_impl/net/server_connection_manager.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 8
9 #include <ostream> 9 #include <ostream>
10 #include <vector> 10 #include <vector>
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 const string& auth_token) { 259 const string& auth_token) {
260 DCHECK(thread_checker_.CalledOnValidThread()); 260 DCHECK(thread_checker_.CalledOnValidThread());
261 261
262 // TODO(pavely): crbug.com/273096. Check for "credentials_lost" is added as 262 // TODO(pavely): crbug.com/273096. Check for "credentials_lost" is added as
263 // workaround for M29 blocker to avoid sending RPC to sync with known invalid 263 // workaround for M29 blocker to avoid sending RPC to sync with known invalid
264 // token but instead to trigger refreshing token in ProfileSyncService. Need 264 // token but instead to trigger refreshing token in ProfileSyncService. Need
265 // to clean it. 265 // to clean it.
266 if (auth_token.empty() || auth_token == "credentials_lost") { 266 if (auth_token.empty() || auth_token == "credentials_lost") {
267 params->response.server_status = HttpResponse::SYNC_AUTH_ERROR; 267 params->response.server_status = HttpResponse::SYNC_AUTH_ERROR;
268 // Print a log to distinguish this "known failure" from others. 268 // Print a log to distinguish this "known failure" from others.
269 LOG(WARNING) << "ServerConnectionManager forcing SYNC_AUTH_ERROR"; 269 DVLOG(1) << "ServerConnectionManager forcing SYNC_AUTH_ERROR due to missing"
270 " auth token";
270 return false; 271 return false;
271 } 272 }
272 273
273 // When our connection object falls out of scope, it clears itself from 274 // When our connection object falls out of scope, it clears itself from
274 // active_connection_. 275 // active_connection_.
275 ScopedConnectionHelper post(this, MakeActiveConnection()); 276 ScopedConnectionHelper post(this, MakeActiveConnection());
276 if (!post.get()) { 277 if (!post.get()) {
277 params->response.server_status = HttpResponse::CONNECTION_UNAVAILABLE; 278 params->response.server_status = HttpResponse::CONNECTION_UNAVAILABLE;
278 return false; 279 return false;
279 } 280 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 328
328 std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr) { 329 std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr) {
329 s << " Response Code (bogus on error): " << hr.response_code; 330 s << " Response Code (bogus on error): " << hr.response_code;
330 s << " Content-Length (bogus on error): " << hr.content_length; 331 s << " Content-Length (bogus on error): " << hr.content_length;
331 s << " Server Status: " 332 s << " Server Status: "
332 << HttpResponse::GetServerConnectionCodeString(hr.server_status); 333 << HttpResponse::GetServerConnectionCodeString(hr.server_status);
333 return s; 334 return s;
334 } 335 }
335 336
336 } // namespace syncer 337 } // namespace syncer
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698