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

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

Issue 10645004: [Sync] Move HttpBridge to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 8 years, 6 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/sync.gyp ('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 (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 // 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 23 matching lines...) Expand all
34 using sync_pb::SyncEnums; 34 using sync_pb::SyncEnums;
35 using sync_pb::SyncEntity; 35 using sync_pb::SyncEntity;
36 using syncable::FIRST_REAL_MODEL_TYPE; 36 using syncable::FIRST_REAL_MODEL_TYPE;
37 using syncable::MODEL_TYPE_COUNT; 37 using syncable::MODEL_TYPE_COUNT;
38 using syncable::ModelType; 38 using syncable::ModelType;
39 using syncable::WriteTransaction; 39 using syncable::WriteTransaction;
40 40
41 static char kValidAuthToken[] = "AuthToken"; 41 static char kValidAuthToken[] = "AuthToken";
42 42
43 MockConnectionManager::MockConnectionManager(syncable::Directory* directory) 43 MockConnectionManager::MockConnectionManager(syncable::Directory* directory)
44 : ServerConnectionManager("unused", 0, false, "version"), 44 : ServerConnectionManager("unused", 0, false),
45 server_reachable_(true), 45 server_reachable_(true),
46 conflict_all_commits_(false), 46 conflict_all_commits_(false),
47 conflict_n_commits_(0), 47 conflict_n_commits_(0),
48 next_new_id_(10000), 48 next_new_id_(10000),
49 store_birthday_("Store BDay!"), 49 store_birthday_("Store BDay!"),
50 store_birthday_sent_(false), 50 store_birthday_sent_(false),
51 client_stuck_(false), 51 client_stuck_(false),
52 commit_time_rename_prepended_string_(""), 52 commit_time_rename_prepended_string_(""),
53 countdown_to_postbuffer_fail_(0), 53 countdown_to_postbuffer_fail_(0),
54 directory_(directory), 54 directory_(directory),
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 server_reachable_ = false; 586 server_reachable_ = false;
587 } 587 }
588 588
589 void MockConnectionManager::UpdateConnectionStatus() { 589 void MockConnectionManager::UpdateConnectionStatus() {
590 if (!server_reachable_) { 590 if (!server_reachable_) {
591 server_status_ = HttpResponse::CONNECTION_UNAVAILABLE; 591 server_status_ = HttpResponse::CONNECTION_UNAVAILABLE;
592 } else { 592 } else {
593 server_status_ = HttpResponse::SERVER_CONNECTION_OK; 593 server_status_ = HttpResponse::SERVER_CONNECTION_OK;
594 } 594 }
595 } 595 }
OLDNEW
« no previous file with comments | « sync/sync.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698