| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/translate/core/browser/translate_prefs.h" | 5 #include "components/translate/core/browser/translate_prefs.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/prefs/scoped_user_pref_update.h" | 11 #include "base/prefs/scoped_user_pref_update.h" |
| 12 #include "build/build_config.h" |
| 12 #include "components/pref_registry/testing_pref_service_syncable.h" | 13 #include "components/pref_registry/testing_pref_service_syncable.h" |
| 13 #include "components/translate/core/browser/translate_download_manager.h" | 14 #include "components/translate/core/browser/translate_download_manager.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 16 |
| 16 namespace { | 17 namespace { |
| 17 | 18 |
| 18 const char kTestLanguage[] = "en"; | 19 const char kTestLanguage[] = "en"; |
| 19 | 20 |
| 20 } // namespace | 21 } // namespace |
| 21 | 22 |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 update.AddDenialTime(now_); | 276 update.AddDenialTime(now_); |
| 276 EXPECT_EQ(update.GetOldestDenialTime(), | 277 EXPECT_EQ(update.GetOldestDenialTime(), |
| 277 now_ - base::TimeDelta::FromMinutes(3)); | 278 now_ - base::TimeDelta::FromMinutes(3)); |
| 278 | 279 |
| 279 update.AddDenialTime(now_); | 280 update.AddDenialTime(now_); |
| 280 EXPECT_EQ(update.GetOldestDenialTime(), | 281 EXPECT_EQ(update.GetOldestDenialTime(), |
| 281 now_ - base::TimeDelta::FromMinutes(2)); | 282 now_ - base::TimeDelta::FromMinutes(2)); |
| 282 } | 283 } |
| 283 | 284 |
| 284 } // namespace translate | 285 } // namespace translate |
| OLD | NEW |