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

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

Issue 7731002: sync: make ServerConnectionManager explicitly NonThreadSafe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dcheck Created 9 years, 4 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 | « chrome/browser/sync/internal_api/sync_manager.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <map> 9 #include <map>
10 10
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 return &(filter.Get(i)); 602 return &(filter.Get(i));
603 } 603 }
604 } 604 }
605 return NULL; 605 return NULL;
606 } 606 }
607 607
608 void MockConnectionManager::SetServerReachable() { 608 void MockConnectionManager::SetServerReachable() {
609 server_status_ = HttpResponse::SERVER_CONNECTION_OK; 609 server_status_ = HttpResponse::SERVER_CONNECTION_OK;
610 server_reachable_ = true; 610 server_reachable_ = true;
611 611
612 listeners_->Notify(&ServerConnectionEventListener::OnServerConnectionEvent, 612 FOR_EACH_OBSERVER(ServerConnectionEventListener, listeners_,
613 ServerConnectionEvent(server_status_, server_reachable_)); 613 OnServerConnectionEvent(
614 ServerConnectionEvent(server_status_, server_reachable_)));
614 } 615 }
615 616
616 void MockConnectionManager::SetServerNotReachable() { 617 void MockConnectionManager::SetServerNotReachable() {
617 server_status_ = HttpResponse::CONNECTION_UNAVAILABLE; 618 server_status_ = HttpResponse::CONNECTION_UNAVAILABLE;
618 server_reachable_ = false; 619 server_reachable_ = false;
619 620
620 listeners_->Notify(&ServerConnectionEventListener::OnServerConnectionEvent, 621 FOR_EACH_OBSERVER(ServerConnectionEventListener, listeners_,
621 ServerConnectionEvent(server_status_, server_reachable_)); 622 OnServerConnectionEvent(
623 ServerConnectionEvent(server_status_, server_reachable_)));
622 } 624 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/internal_api/sync_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698