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

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

Issue 2691803002: Remove ScopedVector in //component/metrics (Closed)
Patch Set: code rebase Created 3 years, 10 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
« no previous file with comments | « components/metrics/daily_event.h ('k') | components/metrics/metrics_log.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 "components/metrics/daily_event.h" 5 #include "components/metrics/daily_event.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "components/prefs/pref_registry_simple.h" 10 #include "components/prefs/pref_registry_simple.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 OnInterval(now); 89 OnInterval(now);
90 } 90 }
91 } 91 }
92 92
93 void DailyEvent::OnInterval(base::Time now) { 93 void DailyEvent::OnInterval(base::Time now) {
94 DCHECK(!now.is_null()); 94 DCHECK(!now.is_null());
95 last_fired_ = now; 95 last_fired_ = now;
96 pref_service_->SetInt64(pref_name_, last_fired_.ToInternalValue()); 96 pref_service_->SetInt64(pref_name_, last_fired_.ToInternalValue());
97 97
98 // Notify all observers 98 // Notify all observers
99 for (ScopedVector<DailyEvent::Observer>::iterator it = observers_.begin(); 99 for (auto it = observers_.begin(); it != observers_.end(); ++it) {
100 it != observers_.end();
101 ++it) {
102 (*it)->OnDailyEvent(); 100 (*it)->OnDailyEvent();
103 } 101 }
104 } 102 }
105 103
106 } // namespace metrics 104 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/daily_event.h ('k') | components/metrics/metrics_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698