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

Unified Diff: sync/engine/syncer_proto_util_unittest.cc

Issue 1505953002: [Sync] Remove ScopedServerStatusWatcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change format of deprecated names. Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/engine/syncer_proto_util.cc ('k') | sync/internal_api/syncapi_server_connection_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer_proto_util_unittest.cc
diff --git a/sync/engine/syncer_proto_util_unittest.cc b/sync/engine/syncer_proto_util_unittest.cc
index 0bc745ff29e68abad16a09ffc137d78a70fb92d7..ae55378b5bd6e4de7f0f5fa1342cfaf286fb4859 100644
--- a/sync/engine/syncer_proto_util_unittest.cc
+++ b/sync/engine/syncer_proto_util_unittest.cc
@@ -34,11 +34,11 @@ using sessions::SyncSessionContext;
class MockDelegate : public sessions::SyncSession::Delegate {
public:
- MockDelegate() {}
- ~MockDelegate() {}
+ MockDelegate() {}
+ ~MockDelegate() {}
MOCK_METHOD1(OnReceivedShortPollIntervalUpdate, void(const base::TimeDelta&));
- MOCK_METHOD1(OnReceivedLongPollIntervalUpdate ,void(const base::TimeDelta&));
+ MOCK_METHOD1(OnReceivedLongPollIntervalUpdate, void(const base::TimeDelta&));
MOCK_METHOD1(OnReceivedSessionsCommitDelay, void(const base::TimeDelta&));
MOCK_METHOD1(OnReceivedClientInvalidationHintBufferSize, void(int));
MOCK_METHOD1(OnSyncProtocolError, void(const SyncProtocolError&));
@@ -225,22 +225,17 @@ TEST_F(SyncerProtoUtilTest, AddRequestBirthday) {
class DummyConnectionManager : public ServerConnectionManager {
public:
- DummyConnectionManager(CancelationSignal* signal)
+ explicit DummyConnectionManager(CancelationSignal* signal)
: ServerConnectionManager("unused", 0, false, signal),
- send_error_(false),
- access_denied_(false) {}
+ send_error_(false) {}
~DummyConnectionManager() override {}
- bool PostBufferWithCachedAuth(PostBufferParams* params,
- ScopedServerStatusWatcher* watcher) override {
+ bool PostBufferWithCachedAuth(PostBufferParams* params) override {
if (send_error_) {
return false;
}
sync_pb::ClientToServerResponse response;
- if (access_denied_) {
- response.set_error_code(sync_pb::SyncEnums::ACCESS_DENIED);
- }
response.SerializeToString(&params->buffer_out);
return true;
@@ -250,13 +245,8 @@ class DummyConnectionManager : public ServerConnectionManager {
send_error_ = send;
}
- void set_access_denied(bool denied) {
- access_denied_ = denied;
- }
-
private:
bool send_error_;
- bool access_denied_;
};
TEST_F(SyncerProtoUtilTest, PostAndProcessHeaders) {
@@ -275,10 +265,6 @@ TEST_F(SyncerProtoUtilTest, PostAndProcessHeaders) {
dcm.set_send_error(false);
EXPECT_TRUE(SyncerProtoUtil::PostAndProcessHeaders(&dcm, NULL,
msg, &response));
-
- dcm.set_access_denied(true);
- EXPECT_FALSE(SyncerProtoUtil::PostAndProcessHeaders(&dcm, NULL,
- msg, &response));
}
} // namespace syncer
« no previous file with comments | « sync/engine/syncer_proto_util.cc ('k') | sync/internal_api/syncapi_server_connection_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698