| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 DCHECK(resource_request_allowed_notifier_.get()); | 293 DCHECK(resource_request_allowed_notifier_.get()); |
| 294 | 294 |
| 295 resource_request_allowed_notifier_->Init(this); | 295 resource_request_allowed_notifier_->Init(this); |
| 296 } | 296 } |
| 297 | 297 |
| 298 VariationsService::~VariationsService() { | 298 VariationsService::~VariationsService() { |
| 299 } | 299 } |
| 300 | 300 |
| 301 bool VariationsService::CreateTrialsFromSeed(base::FeatureList* feature_list) { | 301 bool VariationsService::CreateTrialsFromSeed(base::FeatureList* feature_list) { |
| 302 DCHECK(thread_checker_.CalledOnValidThread()); | 302 DCHECK(thread_checker_.CalledOnValidThread()); |
| 303 CHECK(!create_trials_from_seed_called_); |
| 303 | 304 |
| 304 create_trials_from_seed_called_ = true; | 305 create_trials_from_seed_called_ = true; |
| 305 | 306 |
| 306 variations::VariationsSeed seed; | 307 variations::VariationsSeed seed; |
| 307 if (!LoadSeed(&seed)) | 308 if (!LoadSeed(&seed)) |
| 308 return false; | 309 return false; |
| 309 | 310 |
| 310 const int64_t last_fetch_time_internal = | 311 const int64_t last_fetch_time_internal = |
| 311 local_state_->GetInt64(prefs::kVariationsLastFetchTime); | 312 local_state_->GetInt64(prefs::kVariationsLastFetchTime); |
| 312 const base::Time last_fetch_time = | 313 const base::Time last_fetch_time = |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 std::string stored_country; | 859 std::string stored_country; |
| 859 | 860 |
| 860 if (list_value->GetSize() == 2) { | 861 if (list_value->GetSize() == 2) { |
| 861 list_value->GetString(1, &stored_country); | 862 list_value->GetString(1, &stored_country); |
| 862 } | 863 } |
| 863 | 864 |
| 864 return stored_country; | 865 return stored_country; |
| 865 } | 866 } |
| 866 | 867 |
| 867 } // namespace variations | 868 } // namespace variations |
| OLD | NEW |