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 "chrome/browser/metrics/variations/variations_seed_store.h" | 5 #include "components/metrics/variations_seed_store.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/prefs/testing_pref_service.h" | 8 #include "base/prefs/testing_pref_service.h" |
9 #include "components/metrics/compression_utils.h" | 9 #include "components/metrics/compression_utils.h" |
10 #include "components/variations/pref_names.h" | 10 #include "components/variations/pref_names.h" |
11 #include "components/variations/proto/study.pb.h" | 11 #include "components/variations/proto/study.pb.h" |
12 #include "components/variations/proto/variations_seed.pb.h" | 12 #include "components/variations/proto/variations_seed.pb.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace chrome_variations { | 15 namespace chrome_variations { |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 seed_store.VerifySeedSignature(seed_data, base64_seed_data)); | 284 seed_store.VerifySeedSignature(seed_data, base64_seed_data)); |
285 #endif | 285 #endif |
286 | 286 |
287 // Using a different seed should not match the signature. | 287 // Using a different seed should not match the signature. |
288 seed_data[0] = 'x'; | 288 seed_data[0] = 'x'; |
289 EXPECT_EQ(VariationsSeedStore::VARIATIONS_SEED_SIGNATURE_INVALID_SEED, | 289 EXPECT_EQ(VariationsSeedStore::VARIATIONS_SEED_SIGNATURE_INVALID_SEED, |
290 seed_store.VerifySeedSignature(seed_data, base64_seed_signature)); | 290 seed_store.VerifySeedSignature(seed_data, base64_seed_signature)); |
291 } | 291 } |
292 | 292 |
293 } // namespace chrome_variations | 293 } // namespace chrome_variations |
OLD | NEW |