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

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

Issue 292723004: Remove ClonedInstallDetector/MachineIdProvider //content dependencies (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Eliminate test dependency 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
OLDNEW
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 //------------------------------------------------------------------------------ 5 //------------------------------------------------------------------------------
6 // Description of the life cycle of a instance of MetricsService. 6 // Description of the life cycle of a instance of MetricsService.
7 // 7 //
8 // OVERVIEW 8 // OVERVIEW
9 // 9 //
10 // A MetricsService instance is typically created at application startup. It is 10 // A MetricsService instance is typically created at application startup. It is
(...skipping 1704 matching lines...) Expand 10 before | Expand all | Expand 10 after
1715 } 1715 }
1716 return; 1716 return;
1717 } 1717 }
1718 } 1718 }
1719 1719
1720 SyntheticTrialGroup trial_group = trial; 1720 SyntheticTrialGroup trial_group = trial;
1721 trial_group.start_time = base::TimeTicks::Now(); 1721 trial_group.start_time = base::TimeTicks::Now();
1722 synthetic_trial_groups_.push_back(trial_group); 1722 synthetic_trial_groups_.push_back(trial_group);
1723 } 1723 }
1724 1724
1725 void MetricsService::CheckForClonedInstall() { 1725 void MetricsService::CheckForClonedInstall(
1726 state_manager_->CheckForClonedInstall(); 1726 scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
1727 state_manager_->CheckForClonedInstall(task_runner);
1727 } 1728 }
1728 1729
1729 void MetricsService::GetCurrentSyntheticFieldTrials( 1730 void MetricsService::GetCurrentSyntheticFieldTrials(
1730 std::vector<chrome_variations::ActiveGroupId>* synthetic_trials) { 1731 std::vector<chrome_variations::ActiveGroupId>* synthetic_trials) {
1731 DCHECK(synthetic_trials); 1732 DCHECK(synthetic_trials);
1732 synthetic_trials->clear(); 1733 synthetic_trials->clear();
1733 const MetricsLog* current_log = 1734 const MetricsLog* current_log =
1734 static_cast<const MetricsLog*>(log_manager_.current_log()); 1735 static_cast<const MetricsLog*>(log_manager_.current_log());
1735 for (size_t i = 0; i < synthetic_trial_groups_.size(); ++i) { 1736 for (size_t i = 0; i < synthetic_trial_groups_.size(); ++i) {
1736 if (synthetic_trial_groups_[i].start_time <= current_log->creation_time()) 1737 if (synthetic_trial_groups_[i].start_time <= current_log->creation_time())
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1962 if (metrics_service) 1963 if (metrics_service)
1963 metrics_service->AddObserver(observer); 1964 metrics_service->AddObserver(observer);
1964 } 1965 }
1965 1966
1966 void MetricsServiceHelper::RemoveMetricsServiceObserver( 1967 void MetricsServiceHelper::RemoveMetricsServiceObserver(
1967 MetricsServiceObserver* observer) { 1968 MetricsServiceObserver* observer) {
1968 MetricsService* metrics_service = g_browser_process->metrics_service(); 1969 MetricsService* metrics_service = g_browser_process->metrics_service();
1969 if (metrics_service) 1970 if (metrics_service)
1970 metrics_service->RemoveObserver(observer); 1971 metrics_service->RemoveObserver(observer);
1971 } 1972 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698