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

Side by Side Diff: sync/test/engine/mock_connection_manager.cc

Issue 14888003: [Sync] Log age of auth tokens on authentication failure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « sync/internal_api/sync_manager_impl.cc ('k') | 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 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 // Mock ServerConnectionManager class for use in client regression tests. 5 // Mock ServerConnectionManager class for use in client regression tests.
6 6
7 #include "sync/test/engine/mock_connection_manager.h" 7 #include "sync/test/engine/mock_connection_manager.h"
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 mid_commit_observer_(NULL), 48 mid_commit_observer_(NULL),
49 throttling_(false), 49 throttling_(false),
50 fail_with_auth_invalid_(false), 50 fail_with_auth_invalid_(false),
51 fail_non_periodic_get_updates_(false), 51 fail_non_periodic_get_updates_(false),
52 gu_client_command_(NULL), 52 gu_client_command_(NULL),
53 commit_client_command_(NULL), 53 commit_client_command_(NULL),
54 next_position_in_parent_(2), 54 next_position_in_parent_(2),
55 use_legacy_bookmarks_protocol_(false), 55 use_legacy_bookmarks_protocol_(false),
56 num_get_updates_requests_(0) { 56 num_get_updates_requests_(0) {
57 SetNewTimestamp(0); 57 SetNewTimestamp(0);
58 set_auth_token(kValidAuthToken); 58 SetAuthToken(kValidAuthToken, base::Time());
59 } 59 }
60 60
61 MockConnectionManager::~MockConnectionManager() { 61 MockConnectionManager::~MockConnectionManager() {
62 EXPECT_TRUE(update_queue_.empty()) << "Unfetched updates."; 62 EXPECT_TRUE(update_queue_.empty()) << "Unfetched updates.";
63 } 63 }
64 64
65 void MockConnectionManager::SetCommitTimeRename(string prepend) { 65 void MockConnectionManager::SetCommitTimeRename(string prepend) {
66 commit_time_rename_prepended_string_ = prepend; 66 commit_time_rename_prepended_string_ = prepend;
67 } 67 }
68 68
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 730
731 void MockConnectionManager::UpdateConnectionStatus() { 731 void MockConnectionManager::UpdateConnectionStatus() {
732 if (!server_reachable_) { 732 if (!server_reachable_) {
733 server_status_ = HttpResponse::CONNECTION_UNAVAILABLE; 733 server_status_ = HttpResponse::CONNECTION_UNAVAILABLE;
734 } else { 734 } else {
735 server_status_ = HttpResponse::SERVER_CONNECTION_OK; 735 server_status_ = HttpResponse::SERVER_CONNECTION_OK;
736 } 736 }
737 } 737 }
738 738
739 } // namespace syncer 739 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/sync_manager_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698