| OLD | NEW |
| 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 #include "base/stl_util-inl.h" | 5 #include "base/stl_util.h" |
| 6 #include "base/string_util.h" | 6 #include "base/string_util.h" |
| 7 #include "chrome/browser/extensions/extension_function.h" | 7 #include "chrome/browser/extensions/extension_function.h" |
| 8 #include "chrome/browser/extensions/extensions_quota_service.h" | 8 #include "chrome/browser/extensions/extensions_quota_service.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 using base::TimeDelta; | 11 using base::TimeDelta; |
| 12 using base::TimeTicks; | 12 using base::TimeTicks; |
| 13 | 13 |
| 14 typedef QuotaLimitHeuristic::Bucket Bucket; | 14 typedef QuotaLimitHeuristic::Bucket Bucket; |
| 15 typedef QuotaLimitHeuristic::Config Config; | 15 typedef QuotaLimitHeuristic::Config Config; |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 EXPECT_FALSE(service_->Assess(extension_a_, f, &arg, | 308 EXPECT_FALSE(service_->Assess(extension_a_, f, &arg, |
| 309 kStartTime + TimeDelta::FromSeconds(15))); | 309 kStartTime + TimeDelta::FromSeconds(15))); |
| 310 | 310 |
| 311 // We don't allow this extension to use quota limited functions even if they | 311 // We don't allow this extension to use quota limited functions even if they |
| 312 // wait a while. | 312 // wait a while. |
| 313 EXPECT_FALSE(service_->Assess(extension_a_, f, &arg, | 313 EXPECT_FALSE(service_->Assess(extension_a_, f, &arg, |
| 314 kStartTime + TimeDelta::FromDays(1))); | 314 kStartTime + TimeDelta::FromDays(1))); |
| 315 EXPECT_FALSE(service_->Assess(extension_a_, g, &arg, | 315 EXPECT_FALSE(service_->Assess(extension_a_, g, &arg, |
| 316 kStartTime + TimeDelta::FromDays(1))); | 316 kStartTime + TimeDelta::FromDays(1))); |
| 317 } | 317 } |
| OLD | NEW |