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

Side by Side Diff: content/test/test_power_profiler_observer.cc

Issue 140583003: Chrome power profiler service (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 11 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
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/test/test_power_profiler_observer.h"
6
7 namespace content {
8
9 void TestPowerProfilerObserver::OnPowerEvent(const PowerEvent& event) {
10 if (IsValidEvent(event))
11 ++valid_event_count_;
12 }
13
14 bool TestPowerProfilerObserver::IsValidEvent(const PowerEvent& event) {
15 return event.type < PowerEvent::ID_COUNT && !event.time.is_null()
16 && event.value > 0;
17 }
18
19 } // namespace content
OLDNEW
« content/test/test_power_data_provider.h ('K') | « content/test/test_power_profiler_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698