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 "chrome/common/metrics/entropy_provider.h" | 5 #include "components/variations/entropy_provider.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <limits> | 8 #include <limits> |
9 #include <numeric> | 9 #include <numeric> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/guid.h" | 12 #include "base/guid.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/rand_util.h" | 14 #include "base/rand_util.h" |
15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
16 #include "chrome/common/metrics/metrics_util.h" | 16 #include "components/variations/metrics_util.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 namespace metrics { | 19 namespace metrics { |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // Size of the low entropy source to use for the permuted entropy provider | 23 // Size of the low entropy source to use for the permuted entropy provider |
24 // in tests. | 24 // in tests. |
25 const size_t kMaxLowEntropySize = 8000; | 25 const size_t kMaxLowEntropySize = 8000; |
26 | 26 |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 ++count; | 360 ++count; |
361 } | 361 } |
362 | 362 |
363 ASSERT_LT(count, kMaxAttempts) << "Expected average was " << | 363 ASSERT_LT(count, kMaxAttempts) << "Expected average was " << |
364 kExpectedAverage << ", average ended at " << cumulative_average << | 364 kExpectedAverage << ", average ended at " << cumulative_average << |
365 ", for trial " << kTestTrialNames[i]; | 365 ", for trial " << kTestTrialNames[i]; |
366 } | 366 } |
367 } | 367 } |
368 | 368 |
369 } // namespace metrics | 369 } // namespace metrics |
OLD | NEW |