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> |
| 8 |
7 #include "base/build_time.h" | 9 #include "base/build_time.h" |
8 #include "base/command_line.h" | 10 #include "base/command_line.h" |
9 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
10 #include "base/metrics/sparse_histogram.h" | 12 #include "base/metrics/sparse_histogram.h" |
11 #include "base/prefs/pref_registry_simple.h" | 13 #include "base/prefs/pref_registry_simple.h" |
12 #include "base/prefs/pref_service.h" | 14 #include "base/prefs/pref_service.h" |
13 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
14 #include "base/sys_info.h" | 16 #include "base/sys_info.h" |
15 #include "base/task_runner_util.h" | 17 #include "base/task_runner_util.h" |
16 #include "base/timer/elapsed_timer.h" | 18 #include "base/timer/elapsed_timer.h" |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 create_trials_from_seed_called_(false), | 283 create_trials_from_seed_called_(false), |
282 initial_request_completed_(false), | 284 initial_request_completed_(false), |
283 disable_deltas_for_next_request_(false), | 285 disable_deltas_for_next_request_(false), |
284 resource_request_allowed_notifier_(notifier.Pass()), | 286 resource_request_allowed_notifier_(notifier.Pass()), |
285 request_count_(0), | 287 request_count_(0), |
286 weak_ptr_factory_(this) { | 288 weak_ptr_factory_(this) { |
287 DCHECK(client_.get()); | 289 DCHECK(client_.get()); |
288 DCHECK(resource_request_allowed_notifier_.get()); | 290 DCHECK(resource_request_allowed_notifier_.get()); |
289 | 291 |
290 resource_request_allowed_notifier_->Init(this); | 292 resource_request_allowed_notifier_->Init(this); |
| 293 seed_store_.SetVariationsFirstRunSeedCallback( |
| 294 client_->GetVariationsFirstRunSeedCallback()); |
291 } | 295 } |
292 | 296 |
293 VariationsService::~VariationsService() { | 297 VariationsService::~VariationsService() { |
294 } | 298 } |
295 | 299 |
296 bool VariationsService::CreateTrialsFromSeed(base::FeatureList* feature_list) { | 300 bool VariationsService::CreateTrialsFromSeed(base::FeatureList* feature_list) { |
297 DCHECK(thread_checker_.CalledOnValidThread()); | 301 DCHECK(thread_checker_.CalledOnValidThread()); |
298 | 302 |
299 create_trials_from_seed_called_ = true; | 303 create_trials_from_seed_called_ = true; |
300 | 304 |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 std::string stored_country; | 857 std::string stored_country; |
854 | 858 |
855 if (list_value->GetSize() == 2) { | 859 if (list_value->GetSize() == 2) { |
856 list_value->GetString(1, &stored_country); | 860 list_value->GetString(1, &stored_country); |
857 } | 861 } |
858 | 862 |
859 return stored_country; | 863 return stored_country; |
860 } | 864 } |
861 | 865 |
862 } // namespace variations | 866 } // namespace variations |
OLD | NEW |