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

Unified Diff: components/power/origin_power_map.cc

Issue 514433002: Clear power consumption auditing when you clear history. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/power/origin_power_map.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/power/origin_power_map.cc
diff --git a/components/power/origin_power_map.cc b/components/power/origin_power_map.cc
index 4ce32e28f0cbfa74abb4403e723ac7917eb5d4d9..69d9fbd391f8b8fb34274ead848a571a9b1458b2 100644
--- a/components/power/origin_power_map.cc
+++ b/components/power/origin_power_map.cc
@@ -59,4 +59,9 @@ void OriginPowerMap::OnAllOriginsUpdated() {
callback_list_.Notify();
}
+void OriginPowerMap::ClearOriginMap() {
+ origin_map_.clear();
+ total_consumed_ = 0;
+}
+
} // namespace power
« no previous file with comments | « components/power/origin_power_map.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698