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

Unified Diff: chrome/browser/browsing_data/browsing_data_remover.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 | « no previous file | components/power/origin_power_map.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data/browsing_data_remover.cc
diff --git a/chrome/browser/browsing_data/browsing_data_remover.cc b/chrome/browser/browsing_data/browsing_data_remover.cc
index a38415b2c40b3ce9d58df8637cb1812bd53327e2..2dc65591be3577ff8365d0425ca959f608f7940a 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc
@@ -51,6 +51,8 @@
#include "components/nacl/browser/nacl_browser.h"
#include "components/nacl/browser/pnacl_host.h"
#include "components/password_manager/core/browser/password_store.h"
+#include "components/power/origin_power_map.h"
+#include "components/power/origin_power_map_factory.h"
#include "components/search_engines/template_url_service.h"
#include "components/web_cache/browser/web_cache_manager.h"
#include "content/public/browser/browser_thread.h"
@@ -304,6 +306,12 @@ void BrowsingDataRemover::RemoveImpl(int remove_mask,
#endif
}
+ // The power consumption history by origin contains details of websites
+ // that were visited.
+ power::OriginPowerMap* origin_power_map =
+ power::OriginPowerMapFactory::GetForBrowserContext(profile_);
+ origin_power_map->ClearOriginMap();
+
// Need to clear the host cache and accumulated speculative data, as it also
// reveals some history: we have no mechanism to track when these items were
// created, so we'll clear them all. Better safe than sorry.
« no previous file with comments | « no previous file | components/power/origin_power_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698