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

Side by Side Diff: components/metrics/metrics_service.cc

Issue 2440303002: Remove usage of FOR_EACH_OBSERVER macro in components/ (Closed)
Patch Set: remove superfluous return Created 4 years, 1 month 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
« no previous file with comments | « components/metrics/leak_detector/leak_detector.cc ('k') | no next file » | 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 //------------------------------------------------------------------------------ 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 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 DCHECK_EQ(INITIALIZED, state_); 1140 DCHECK_EQ(INITIALIZED, state_);
1141 metrics_providers_.push_back(std::move(provider)); 1141 metrics_providers_.push_back(std::move(provider));
1142 } 1142 }
1143 1143
1144 void MetricsService::CheckForClonedInstall( 1144 void MetricsService::CheckForClonedInstall(
1145 scoped_refptr<base::SingleThreadTaskRunner> task_runner) { 1145 scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
1146 state_manager_->CheckForClonedInstall(task_runner); 1146 state_manager_->CheckForClonedInstall(task_runner);
1147 } 1147 }
1148 1148
1149 void MetricsService::NotifySyntheticTrialObservers() { 1149 void MetricsService::NotifySyntheticTrialObservers() {
1150 FOR_EACH_OBSERVER(variations::SyntheticTrialObserver, 1150 for (variations::SyntheticTrialObserver& observer :
1151 synthetic_trial_observer_list_, 1151 synthetic_trial_observer_list_) {
1152 OnSyntheticTrialsChanged(synthetic_trial_groups_)); 1152 observer.OnSyntheticTrialsChanged(synthetic_trial_groups_);
1153 }
1153 } 1154 }
1154 1155
1155 void MetricsService::GetSyntheticFieldTrialsOlderThan( 1156 void MetricsService::GetSyntheticFieldTrialsOlderThan(
1156 base::TimeTicks time, 1157 base::TimeTicks time,
1157 std::vector<variations::ActiveGroupId>* synthetic_trials) { 1158 std::vector<variations::ActiveGroupId>* synthetic_trials) {
1158 DCHECK(synthetic_trials); 1159 DCHECK(synthetic_trials);
1159 synthetic_trials->clear(); 1160 synthetic_trials->clear();
1160 for (size_t i = 0; i < synthetic_trial_groups_.size(); ++i) { 1161 for (size_t i = 0; i < synthetic_trial_groups_.size(); ++i) {
1161 if (synthetic_trial_groups_[i].start_time <= time) 1162 if (synthetic_trial_groups_[i].start_time <= time)
1162 synthetic_trials->push_back(synthetic_trial_groups_[i].id); 1163 synthetic_trials->push_back(synthetic_trial_groups_[i].id);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 base::Time::Now().ToTimeT()); 1223 base::Time::Now().ToTimeT());
1223 } 1224 }
1224 1225
1225 void MetricsService::SkipAndDiscardUpload() { 1226 void MetricsService::SkipAndDiscardUpload() {
1226 log_manager_.DiscardStagedLog(); 1227 log_manager_.DiscardStagedLog();
1227 scheduler_->UploadCancelled(); 1228 scheduler_->UploadCancelled();
1228 log_upload_in_progress_ = false; 1229 log_upload_in_progress_ = false;
1229 } 1230 }
1230 1231
1231 } // namespace metrics 1232 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/leak_detector/leak_detector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698