Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: chrome/browser/metrics/metrics_services_manager.cc

Issue 238443008: Make VariationsService simulate received seeds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/metrics/variations/variations_seed_store.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/metrics_services_manager.h" 5 #include "chrome/browser/metrics/metrics_services_manager.h"
6 6
7 #include "chrome/browser/metrics/metrics_service.h" 7 #include "chrome/browser/metrics/metrics_service.h"
8 #include "chrome/browser/metrics/metrics_state_manager.h" 8 #include "chrome/browser/metrics/metrics_state_manager.h"
9 #include "chrome/browser/metrics/variations/variations_service.h" 9 #include "chrome/browser/metrics/variations/variations_service.h"
10 #include "components/rappor/rappor_service.h" 10 #include "components/rappor/rappor_service.h"
(...skipping 17 matching lines...) Expand all
28 DCHECK(thread_checker_.CalledOnValidThread()); 28 DCHECK(thread_checker_.CalledOnValidThread());
29 if (!rappor_service_) 29 if (!rappor_service_)
30 rappor_service_.reset(new rappor::RapporService); 30 rappor_service_.reset(new rappor::RapporService);
31 return rappor_service_.get(); 31 return rappor_service_.get();
32 } 32 }
33 33
34 chrome_variations::VariationsService* 34 chrome_variations::VariationsService*
35 MetricsServicesManager::GetVariationsService() { 35 MetricsServicesManager::GetVariationsService() {
36 DCHECK(thread_checker_.CalledOnValidThread()); 36 DCHECK(thread_checker_.CalledOnValidThread());
37 if (!variations_service_) { 37 if (!variations_service_) {
38 variations_service_.reset( 38 variations_service_ =
39 chrome_variations::VariationsService::Create(local_state_)); 39 chrome_variations::VariationsService::Create(local_state_,
40 GetMetricsStateManager());
40 } 41 }
41 return variations_service_.get(); 42 return variations_service_.get();
42 } 43 }
43 44
44 metrics::MetricsStateManager* MetricsServicesManager::GetMetricsStateManager() { 45 metrics::MetricsStateManager* MetricsServicesManager::GetMetricsStateManager() {
45 DCHECK(thread_checker_.CalledOnValidThread()); 46 DCHECK(thread_checker_.CalledOnValidThread());
46 if (!metrics_state_manager_) 47 if (!metrics_state_manager_)
47 metrics_state_manager_ = metrics::MetricsStateManager::Create(local_state_); 48 metrics_state_manager_ = metrics::MetricsStateManager::Create(local_state_);
48 return metrics_state_manager_.get(); 49 return metrics_state_manager_.get();
49 } 50 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/variations/variations_seed_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698