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

Unified Diff: components/autofill/browser/autocheckout/whitelist_manager.h

Issue 14060013: Add UMA stats to track whitelist download latency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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: components/autofill/browser/autocheckout/whitelist_manager.h
diff --git a/components/autofill/browser/autocheckout/whitelist_manager.h b/components/autofill/browser/autocheckout/whitelist_manager.h
index 5d8634cf07c2c685e99a191de82f8ad1d0718c1f..4645dbfc015240926219d8110d3d0c6fe194c009 100644
--- a/components/autofill/browser/autocheckout/whitelist_manager.h
+++ b/components/autofill/browser/autocheckout/whitelist_manager.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/timer.h"
+#include "components/autofill/browser/autofill_metrics.h"
#include "net/url_request/url_fetcher_delegate.h"
class GURL;
@@ -49,6 +50,12 @@ class WhitelistManager : public net::URLFetcherDelegate {
// as a separate method for mocking out in tests.
virtual void StartDownloadTimer(size_t interval_seconds);
+ // Returns the |AutofillMetrics| instance that should be used for logging
ahutter 2013/04/16 17:56:54 Take a look at autocheckout_manager.h. Might be go
benquan 2013/04/17 01:51:30 I was following autocheckout_request_manager.h and
+ // Autocheckout whitelist file downloading.
+ virtual const AutofillMetrics& GetMetricLogger() const {
+ return metrics_logger_;
Ilya Sherman 2013/04/17 00:18:01 nit: virtual method implementations belong in the
benquan 2013/04/17 01:51:30 Done.
+ }
+
// Timer callback indicating it's time to download whitelist from server.
void TriggerDownload();
@@ -83,6 +90,11 @@ class WhitelistManager : public net::URLFetcherDelegate {
// State of the kBypassAutocheckoutWhitelist flag.
const bool bypass_autocheckout_whitelist_;
+ // Metrics Logging stuff.
ahutter 2013/04/16 17:56:54 "Logger for UMA metrics" or something like that.
benquan 2013/04/17 01:51:30 Done.
+ AutofillMetrics metrics_logger_;
ahutter 2013/04/16 17:56:54 new line after this.
benquan 2013/04/17 01:51:30 Done.
+ // When the whitelist download started. Used to track download latency.
+ base::Time request_started_timestamp_;
+
// The request object.
scoped_ptr<net::URLFetcher> request_;

Powered by Google App Engine
This is Rietveld 408576698