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

Unified Diff: chrome/browser/browsing_data_appcache_helper.cc

Issue 10092013: Display third party cookies and site data counts in the WebsiteSettings UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "Fix CannedBrowsingDataDatabaseHelperTest.*" Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browsing_data_appcache_helper.h ('k') | chrome/browser/browsing_data_cookie_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data_appcache_helper.cc
diff --git a/chrome/browser/browsing_data_appcache_helper.cc b/chrome/browser/browsing_data_appcache_helper.cc
index a16ff02642366f8fec67c907973eefea73cde4be..d36c467ca41336231294ed54f33e1ba6a3968516 100644
--- a/chrome/browser/browsing_data_appcache_helper.cc
+++ b/chrome/browser/browsing_data_appcache_helper.cc
@@ -108,8 +108,7 @@ void CannedBrowsingDataAppCacheHelper::AddAppCache(const GURL& manifest_url) {
if (!BrowsingDataHelper::HasValidScheme(manifest_url))
return; // Ignore non-websafe schemes.
- typedef std::map<GURL, appcache::AppCacheInfoVector> InfoByOrigin;
- InfoByOrigin& origin_map = info_collection_->infos_by_origin;
+ OriginAppCacheInfoMap& origin_map = info_collection_->infos_by_origin;
appcache::AppCacheInfoVector& appcache_infos_ =
origin_map[manifest_url.GetOrigin()];
@@ -133,6 +132,22 @@ bool CannedBrowsingDataAppCacheHelper::empty() const {
return info_collection_->infos_by_origin.empty();
}
+size_t CannedBrowsingDataAppCacheHelper::GetAppCacheCount() const {
+ size_t count = 0;
+ const OriginAppCacheInfoMap& map = info_collection_->infos_by_origin;
+ for (OriginAppCacheInfoMap::const_iterator it = map.begin();
+ it != map.end();
+ ++it) {
+ count += it->second.size();
+ }
+ return count;
+}
+
+const BrowsingDataAppCacheHelper::OriginAppCacheInfoMap&
+CannedBrowsingDataAppCacheHelper::GetOriginAppCacheInfoMap() const {
+ return info_collection_->infos_by_origin;
+}
+
void CannedBrowsingDataAppCacheHelper::StartFetching(
const base::Closure& completion_callback) {
completion_callback.Run();
« no previous file with comments | « chrome/browser/browsing_data_appcache_helper.h ('k') | chrome/browser/browsing_data_cookie_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698