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

Unified Diff: chrome/browser/extensions/activity_log/hashed_ad_network_database.cc

Issue 274563003: Resubmit: Add real file for AdNetworks DB (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: chrome/browser/extensions/activity_log/hashed_ad_network_database.cc
diff --git a/chrome/browser/extensions/activity_log/hashed_ad_network_database.cc b/chrome/browser/extensions/activity_log/hashed_ad_network_database.cc
index 3e6f7ce4c26b85cd5eae063a0de87f3d09ec719d..f9cc4ba18df7f2a59686814db19366c59cdc03ed 100644
--- a/chrome/browser/extensions/activity_log/hashed_ad_network_database.cc
+++ b/chrome/browser/extensions/activity_log/hashed_ad_network_database.cc
@@ -31,7 +31,8 @@ const size_t kChecksumHashSize = 32u;
} // namespace
HashedAdNetworkDatabase::HashedAdNetworkDatabase(
- scoped_refptr<base::RefCountedStaticMemory> entries_memory) {
+ scoped_refptr<base::RefCountedStaticMemory> entries_memory)
+ : is_valid_(false) {
// This can legitimately happen in unit tests.
if (!entries_memory)
return;
@@ -67,6 +68,8 @@ HashedAdNetworkDatabase::HashedAdNetworkDatabase(
memcpy(&value, index, kUrlHashSize);
entries_.insert(value);
}
+
+ is_valid_ = true;
}
HashedAdNetworkDatabase::~HashedAdNetworkDatabase() {}

Powered by Google App Engine
This is Rietveld 408576698