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

Side by Side Diff: chrome/browser/chromeos/external_metrics.cc

Issue 2858073002: Use constexpr TaskTraits constructor in chrome. (Closed)
Patch Set: Created 3 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
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 #include "chrome/browser/chromeos/external_metrics.h" 5 #include "chrome/browser/chromeos/external_metrics.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 return samples.size(); 166 return samples.size();
167 } 167 }
168 168
169 void ExternalMetrics::CollectEventsAndReschedule() { 169 void ExternalMetrics::CollectEventsAndReschedule() {
170 CollectEvents(); 170 CollectEvents();
171 ScheduleCollector(); 171 ScheduleCollector();
172 } 172 }
173 173
174 void ExternalMetrics::ScheduleCollector() { 174 void ExternalMetrics::ScheduleCollector() {
175 base::PostDelayedTaskWithTraits( 175 base::PostDelayedTaskWithTraits(
176 FROM_HERE, 176 FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
177 base::TaskTraits().MayBlock().WithPriority(
178 base::TaskPriority::BACKGROUND),
179 base::BindOnce(&chromeos::ExternalMetrics::CollectEventsAndReschedule, 177 base::BindOnce(&chromeos::ExternalMetrics::CollectEventsAndReschedule,
180 this), 178 this),
181 kExternalMetricsCollectionInterval); 179 kExternalMetricsCollectionInterval);
182 } 180 }
183 181
184 } // namespace chromeos 182 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/install_limiter.cc ('k') | chrome/browser/chromeos/file_manager/open_with_browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698