| OLD | NEW |
| 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 #include "sync/engine/syncer_proto_util.h" | 5 #include "sync/engine/syncer_proto_util.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/time.h" | 12 #include "base/time.h" |
| 13 #include "sync/engine/throttled_data_type_tracker.h" | 13 #include "sync/engine/throttled_data_type_tracker.h" |
| 14 #include "sync/internal_api/public/base/model_type_test_util.h" | 14 #include "sync/internal_api/public/base/model_type_test_util.h" |
| 15 #include "sync/protocol/bookmark_specifics.pb.h" | 15 #include "sync/protocol/bookmark_specifics.pb.h" |
| 16 #include "sync/protocol/password_specifics.pb.h" | 16 #include "sync/protocol/password_specifics.pb.h" |
| 17 #include "sync/protocol/sync.pb.h" | 17 #include "sync/protocol/sync.pb.h" |
| 18 #include "sync/protocol/sync_enums.pb.h" | 18 #include "sync/protocol/sync_enums.pb.h" |
| 19 #include "sync/sessions/session_state.h" | |
| 20 #include "sync/sessions/sync_session_context.h" | 19 #include "sync/sessions/sync_session_context.h" |
| 21 #include "sync/syncable/blob.h" | 20 #include "sync/syncable/blob.h" |
| 22 #include "sync/syncable/directory.h" | 21 #include "sync/syncable/directory.h" |
| 23 #include "sync/test/engine/mock_connection_manager.h" | 22 #include "sync/test/engine/mock_connection_manager.h" |
| 24 #include "sync/test/engine/test_directory_setter_upper.h" | 23 #include "sync/test/engine/test_directory_setter_upper.h" |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
| 26 | 25 |
| 27 using ::testing::_; | 26 using ::testing::_; |
| 28 | 27 |
| 29 using sync_pb::ClientToServerMessage; | 28 using sync_pb::ClientToServerMessage; |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 error.error_type = THROTTLED; | 285 error.error_type = THROTTLED; |
| 287 | 286 |
| 288 base::TimeTicks ticks = base::TimeTicks::FromInternalValue(1); | 287 base::TimeTicks ticks = base::TimeTicks::FromInternalValue(1); |
| 289 | 288 |
| 290 EXPECT_CALL(delegate, OnSilencedUntil(ticks)); | 289 EXPECT_CALL(delegate, OnSilencedUntil(ticks)); |
| 291 | 290 |
| 292 SyncerProtoUtil::HandleThrottleError(error, ticks, &tracker, &delegate); | 291 SyncerProtoUtil::HandleThrottleError(error, ticks, &tracker, &delegate); |
| 293 EXPECT_TRUE(tracker.GetThrottledTypes().Empty()); | 292 EXPECT_TRUE(tracker.GetThrottledTypes().Empty()); |
| 294 } | 293 } |
| 295 } // namespace syncer | 294 } // namespace syncer |
| OLD | NEW |