| 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/browser/metrics/variations/variations_service.h" | 5 #include "chrome/browser/metrics/variations/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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 void DoActualFetch() override { | 65 void DoActualFetch() override { |
| 66 if (intercepts_fetch_) { | 66 if (intercepts_fetch_) { |
| 67 fetch_attempted_ = true; | 67 fetch_attempted_ = true; |
| 68 return; | 68 return; |
| 69 } | 69 } |
| 70 | 70 |
| 71 VariationsService::DoActualFetch(); | 71 VariationsService::DoActualFetch(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 protected: | 74 protected: |
| 75 void StoreSeed(const std::string& seed_data, | 75 bool StoreSeed(const std::string& seed_data, |
| 76 const std::string& seed_signature, | 76 const std::string& seed_signature, |
| 77 const base::Time& date_fetched) override { | 77 const std::string& country_code, |
| 78 const base::Time& date_fetched, |
| 79 bool is_delta_compressed) override { |
| 78 seed_stored_ = true; | 80 seed_stored_ = true; |
| 81 return true; |
| 79 } | 82 } |
| 80 | 83 |
| 81 private: | 84 private: |
| 82 bool intercepts_fetch_; | 85 bool intercepts_fetch_; |
| 83 bool fetch_attempted_; | 86 bool fetch_attempted_; |
| 84 bool seed_stored_; | 87 bool seed_stored_; |
| 85 | 88 |
| 86 DISALLOW_COPY_AND_ASSIGN(TestVariationsService); | 89 DISALLOW_COPY_AND_ASSIGN(TestVariationsService); |
| 87 }; | 90 }; |
| 88 | 91 |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 << test.pref_value_before << ", " << test.version << ", " | 530 << test.pref_value_before << ", " << test.version << ", " |
| 528 << test.latest_country_code; | 531 << test.latest_country_code; |
| 529 | 532 |
| 530 histogram_tester.ExpectUniqueSample( | 533 histogram_tester.ExpectUniqueSample( |
| 531 "Variations.LoadPermanentConsistencyCountryResult", | 534 "Variations.LoadPermanentConsistencyCountryResult", |
| 532 test.expected_result, 1); | 535 test.expected_result, 1); |
| 533 } | 536 } |
| 534 } | 537 } |
| 535 | 538 |
| 536 } // namespace chrome_variations | 539 } // namespace chrome_variations |
| OLD | NEW |