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

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

Issue 3305003: New authorization framework for sync. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/test/sync/engine/mock_connection_manager.h" 7 #include "chrome/test/sync/engine/mock_connection_manager.h"
8 8
9 #include "chrome/browser/sync/engine/syncer_proto_util.h" 9 #include "chrome/browser/sync/engine/syncer_proto_util.h"
10 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h" 10 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h"
(...skipping 15 matching lines...) Expand all
26 using sync_pb::SyncEntity; 26 using sync_pb::SyncEntity;
27 using syncable::DirectoryManager; 27 using syncable::DirectoryManager;
28 using syncable::FIRST_REAL_MODEL_TYPE; 28 using syncable::FIRST_REAL_MODEL_TYPE;
29 using syncable::MODEL_TYPE_COUNT; 29 using syncable::MODEL_TYPE_COUNT;
30 using syncable::ModelType; 30 using syncable::ModelType;
31 using syncable::ScopedDirLookup; 31 using syncable::ScopedDirLookup;
32 using syncable::WriteTransaction; 32 using syncable::WriteTransaction;
33 33
34 MockConnectionManager::MockConnectionManager(DirectoryManager* dirmgr, 34 MockConnectionManager::MockConnectionManager(DirectoryManager* dirmgr,
35 const string& name) 35 const string& name)
36 : ServerConnectionManager("unused", 0, false, "version", "id"), 36 : ServerConnectionManager("unused", 0, false, "version"),
37 conflict_all_commits_(false), 37 conflict_all_commits_(false),
38 conflict_n_commits_(0), 38 conflict_n_commits_(0),
39 next_new_id_(10000), 39 next_new_id_(10000),
40 store_birthday_("Store BDay!"), 40 store_birthday_("Store BDay!"),
41 store_birthday_sent_(false), 41 store_birthday_sent_(false),
42 client_stuck_(false), 42 client_stuck_(false),
43 commit_time_rename_prepended_string_(""), 43 commit_time_rename_prepended_string_(""),
44 fail_next_postbuffer_(false), 44 fail_next_postbuffer_(false),
45 directory_manager_(dirmgr), 45 directory_manager_(dirmgr),
46 directory_name_(name), 46 directory_name_(name),
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 526
527 void MockConnectionManager::SetServerNotReachable() { 527 void MockConnectionManager::SetServerNotReachable() {
528 server_status_ = HttpResponse::CONNECTION_UNAVAILABLE; 528 server_status_ = HttpResponse::CONNECTION_UNAVAILABLE;
529 server_reachable_ = false; 529 server_reachable_ = false;
530 browser_sync::ServerConnectionEvent event = { 530 browser_sync::ServerConnectionEvent event = {
531 browser_sync::ServerConnectionEvent::STATUS_CHANGED, 531 browser_sync::ServerConnectionEvent::STATUS_CHANGED,
532 server_status_, 532 server_status_,
533 server_reachable_ }; 533 server_reachable_ };
534 channel_->NotifyListeners(event); 534 channel_->NotifyListeners(event);
535 } 535 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698