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 "components/variations/service/variations_service.h" | 5 #include "components/variations/service/variations_service.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/json/json_string_value_serializer.h" | 10 #include "base/json/json_string_value_serializer.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } | 53 } |
54 bool OverridesRestrictParameter(std::string* parameter) override { | 54 bool OverridesRestrictParameter(std::string* parameter) override { |
55 if (restrict_parameter_.empty()) | 55 if (restrict_parameter_.empty()) |
56 return false; | 56 return false; |
57 *parameter = restrict_parameter_; | 57 *parameter = restrict_parameter_; |
58 return true; | 58 return true; |
59 } | 59 } |
60 void OverrideUIString(uint32_t hash, const base::string16& string) override {} | 60 void OverrideUIString(uint32_t hash, const base::string16& string) override {} |
61 void OnInitialStartup() override {} | 61 void OnInitialStartup() override {} |
62 | 62 |
63 void set_restrict_parameter(std::string value) { | 63 void set_restrict_parameter(const std::string& value) { |
64 restrict_parameter_ = value; | 64 restrict_parameter_ = value; |
65 } | 65 } |
66 | 66 |
67 private: | 67 private: |
68 std::string restrict_parameter_; | 68 std::string restrict_parameter_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(TestVariationsServiceClient); | 70 DISALLOW_COPY_AND_ASSIGN(TestVariationsServiceClient); |
71 }; | 71 }; |
72 | 72 |
73 // A test class used to validate expected functionality in VariationsService. | 73 // A test class used to validate expected functionality in VariationsService. |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 << test.pref_value_before << ", " << test.version << ", " | 535 << test.pref_value_before << ", " << test.version << ", " |
536 << test.latest_country_code; | 536 << test.latest_country_code; |
537 | 537 |
538 histogram_tester.ExpectUniqueSample( | 538 histogram_tester.ExpectUniqueSample( |
539 "Variations.LoadPermanentConsistencyCountryResult", | 539 "Variations.LoadPermanentConsistencyCountryResult", |
540 test.expected_result, 1); | 540 test.expected_result, 1); |
541 } | 541 } |
542 } | 542 } |
543 | 543 |
544 } // namespace variations | 544 } // namespace variations |
OLD | NEW |