| 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/backoff_delay_provider.h" | 5 #include "components/sync/engine_impl/backoff_delay_provider.h" | 
| 6 | 6 | 
| 7 #include <memory> | 7 #include <memory> | 
| 8 | 8 | 
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" | 
| 10 #include "sync/internal_api/public/engine/polling_constants.h" | 10 #include "components/sync/base/syncer_error.h" | 
| 11 #include "sync/internal_api/public/sessions/model_neutral_state.h" | 11 #include "components/sync/engine/polling_constants.h" | 
| 12 #include "sync/internal_api/public/util/syncer_error.h" | 12 #include "components/sync/sessions/model_neutral_state.h" | 
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" | 
| 14 | 14 | 
| 15 using base::TimeDelta; | 15 using base::TimeDelta; | 
| 16 | 16 | 
| 17 namespace syncer { | 17 namespace syncer { | 
| 18 | 18 | 
| 19 class BackoffDelayProviderTest : public testing::Test {}; | 19 class BackoffDelayProviderTest : public testing::Test {}; | 
| 20 | 20 | 
| 21 TEST_F(BackoffDelayProviderTest, GetRecommendedDelay) { | 21 TEST_F(BackoffDelayProviderTest, GetRecommendedDelay) { | 
| 22   std::unique_ptr<BackoffDelayProvider> delay( | 22   std::unique_ptr<BackoffDelayProvider> delay( | 
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 121   state.commit_result = SERVER_RETURN_MIGRATION_DONE; | 121   state.commit_result = SERVER_RETURN_MIGRATION_DONE; | 
| 122   EXPECT_EQ(kInitialBackoffImmediateRetrySeconds, | 122   EXPECT_EQ(kInitialBackoffImmediateRetrySeconds, | 
| 123             delay->GetInitialDelay(state).InSeconds()); | 123             delay->GetInitialDelay(state).InSeconds()); | 
| 124 | 124 | 
| 125   state.commit_result = SERVER_RETURN_CONFLICT; | 125   state.commit_result = SERVER_RETURN_CONFLICT; | 
| 126   EXPECT_EQ(kInitialBackoffImmediateRetrySeconds, | 126   EXPECT_EQ(kInitialBackoffImmediateRetrySeconds, | 
| 127             delay->GetInitialDelay(state).InSeconds()); | 127             delay->GetInitialDelay(state).InSeconds()); | 
| 128 } | 128 } | 
| 129 | 129 | 
| 130 }  // namespace syncer | 130 }  // namespace syncer | 
| OLD | NEW | 
|---|