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

Side by Side Diff: chrome/browser/password_manager/password_manager_util.cc

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: Review 3 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 #include "chrome/browser/password_manager/password_manager_util.h"
6
7 #include "base/strings/string_util.h"
8
9 namespace password_manager_util {
10
11 bool IsDomainNameMonitored(const std::string& url_host,
12 std::string* domain_name) {
13
14 const std::string kMonitoredDomainName[] = {
15 "google.com",
16 "yahoo.com",
17 "baidu.com",
18 "wikipedia.org",
19 "linkedin.com",
20 "twitter.com",
21 "live.com",
22 "amazon.com",
23 };
24 const size_t kMonitoredDomainNameLength = arraysize(kMonitoredDomainName);
25
26 domain_name->clear();
27
28 for (std::string::size_type i = 0; i < kMonitoredDomainNameLength; ++i) {
29 if (EndsWith(url_host, kMonitoredDomainName[i], true)) {
vabr (Chromium) 2013/08/28 15:49:45 Currently this would match "notreallygoogle.com" a
30 *domain_name = kMonitoredDomainName[i];
31 return true;
32 }
33 }
34 return false;
35 }
36
37 } // namespace password_manager_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698