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

Side by Side Diff: chrome/browser/password_manager/password_manager_metrics_util.h

Issue 23140005: Added of new UMA signals in order to be able to discover early if the "save password" feature gets … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor changes Created 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_METRICS_UTIL_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_METRICS_UTIL_H_
7
8 #include <string>
9
10 namespace password_manager_metrics_util {
11
12 // We monitor the performance of the save password heuristic for a handful of
13 // domains. For privacy reasons we are not reporting UMA signals by domain, but
14 // by a domain group. A domain group can contain multiple domains, and a domain
15 // can be contained in multiple groups.
16 // For more information see http://goo.gl/vUuFd5.
17
18 // The number of groups in which each monitored website appears.
19 // It is a half of the total number of groups.
20 const size_t kGroupsPerDomain = 10u;
21
22 // Check whether the |url_host| is monitored or not. If yes, we return
23 // the id of the group which contains the domain name otherwise
24 // returns 0.
25 size_t MonitoredDomainGroupId(const std::string& url_host);
26
27 // A version of the UMA_HISTOGRAM_ENUMERATION macro that allows the |name|
28 // to vary over the program's runtime.
29 void LogUMAHistogramEnumeration(const std::string& name,
30 int sample,
31 int boundary_value);
32
33 // A version of the UMA_HISTOGRAM_BOOLEAN macro that allows the |name|
34 // to vary over the program's runtime.
35 void LogUMAHistogramBoolean(const std::string& name, bool sample);
36
37 // Sets the |kGroupsPerDomain| to |value|. Needed in order to test the
Ilya Sherman 2013/09/14 03:33:25 |kGroupsPerDomain| is a constant, not a variable,
38 // MonitoredDomainGroupId function with all possible values of
39 // |kGroupsPerDomain|. Normally,the value of |kGroupsPerDomain| is
40 // randomly generated in range [0, |kGroupsPerDomain|).
41 void SetRandomIdForTesting(size_t value);
42
43 // Returns a string which contains group_|group_id|. If the
44 // group_id corresponds to an unmonitored domain returns an empty string.
45 std::string GroupIdToString(size_t group_id);
46
47 } // namespace password_manager_metrics_util
48
49 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_METRICS_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698