| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_processor.h" | 5 #include "components/variations/variations_seed_processor.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| 11 #include "chrome/common/metrics/variations/variations_associated_data.h" | 11 #include "components/variations/variations_associated_data.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 namespace chrome_variations { | 14 namespace chrome_variations { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 // Converts |time| to Study proto format. | 18 // Converts |time| to Study proto format. |
| 19 int64 TimeToProtoTime(const base::Time& time) { | 19 int64 TimeToProtoTime(const base::Time& time) { |
| 20 return (time - base::Time::UnixEpoch()).InSeconds(); | 20 return (time - base::Time::UnixEpoch()).InSeconds(); |
| 21 } | 21 } |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 EXPECT_EQ("y", GetVariationParamValue("Study1", "x")); | 522 EXPECT_EQ("y", GetVariationParamValue("Study1", "x")); |
| 523 | 523 |
| 524 study.set_name("Study2"); | 524 study.set_name("Study2"); |
| 525 experiment1->set_probability_weight(0); | 525 experiment1->set_probability_weight(0); |
| 526 experiment2->set_probability_weight(1); | 526 experiment2->set_probability_weight(1); |
| 527 seed_processor.CreateTrialFromStudy(study, false); | 527 seed_processor.CreateTrialFromStudy(study, false); |
| 528 EXPECT_EQ(std::string(), GetVariationParamValue("Study2", "x")); | 528 EXPECT_EQ(std::string(), GetVariationParamValue("Study2", "x")); |
| 529 } | 529 } |
| 530 | 530 |
| 531 } // namespace chrome_variations | 531 } // namespace chrome_variations |
| OLD | NEW |