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

Unified Diff: chrome/browser/webdata/keyword_table.cc

Issue 8430027: Added histogram on successful check. Safe verification (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed signing, added counters Created 9 years, 2 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/webdata/keyword_table.cc
diff --git a/chrome/browser/webdata/keyword_table.cc b/chrome/browser/webdata/keyword_table.cc
index b5391948028ed73a6780c7b34ec9bd2b59688082..6e234cb0c1fd79a2a1022c0615bcc1b497d0d8ce 100644
--- a/chrome/browser/webdata/keyword_table.cc
+++ b/chrome/browser/webdata/keyword_table.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/metrics/histogram.h"
+#include "base/metrics/stats_counters.h"
#include "base/string_number_conversions.h"
#include "base/string_split.h"
#include "base/string_util.h"
@@ -79,7 +80,7 @@ std::string GetSearchProviderIDSignature(int64 id) {
// Checks if signature for search provider id is correct and returns the
// result.
bool IsSearchProviderIDValid(int64 id, const std::string& signature) {
- return signature == GetSearchProviderIDSignature(id);
+ return protector::IsSettingValid(base::Int64ToString(id), signature);
}
} // anonymous namespace
@@ -281,14 +282,21 @@ bool KeywordTable::DidDefaultSearchProviderChange() {
protector::kProtectorHistogramDefaultSearchProvider,
protector::kProtectorErrorBackupInvalid,
protector::kProtectorErrorCount);
+ SIMPLE_STATS_COUNTER(protector::kProtectorBackupInvalidCounter);
return true;
} else if (backup_value != GetDefaultSearchProviderID()) {
UMA_HISTOGRAM_ENUMERATION(
protector::kProtectorHistogramDefaultSearchProvider,
protector::kProtectorErrorValueChanged,
protector::kProtectorErrorCount);
+ SIMPLE_STATS_COUNTER(protector::kProtectorValueChangedCounter);
return true;
}
+ UMA_HISTOGRAM_ENUMERATION(
+ protector::kProtectorHistogramDefaultSearchProvider,
+ protector::kProtectorErrorValueValid,
+ protector::kProtectorErrorCount);
+ SIMPLE_STATS_COUNTER(protector::kProtectorValueValidCounter);
return false;
}

Powered by Google App Engine
This is Rietveld 408576698