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

Side by Side Diff: chrome/browser/safe_browsing/chrome_password_protection_service.cc

Issue 2911293003: Reland: Cache protected password entry and password on focus ping separately. (Closed)
Patch Set: Fix Crashes by Using GetDictionaryWithoutPathExpansion Created 3 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/safe_browsing/chrome_password_protection_service.h" 5 #include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
6 6
7 #include "base/feature_list.h" 7 #include "base/feature_list.h"
8 #include "base/metrics/field_trial_params.h" 8 #include "base/metrics/field_trial_params.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 ui_manager_(sb_service->ui_manager()), 48 ui_manager_(sb_service->ui_manager()),
49 profile_(profile), 49 profile_(profile),
50 navigation_observer_manager_(sb_service->navigation_observer_manager()) { 50 navigation_observer_manager_(sb_service->navigation_observer_manager()) {
51 DCHECK(profile_); 51 DCHECK(profile_);
52 } 52 }
53 53
54 ChromePasswordProtectionService::~ChromePasswordProtectionService() { 54 ChromePasswordProtectionService::~ChromePasswordProtectionService() {
55 if (content_settings()) { 55 if (content_settings()) {
56 CleanUpExpiredVerdicts(); 56 CleanUpExpiredVerdicts();
57 UMA_HISTOGRAM_COUNTS_1000( 57 UMA_HISTOGRAM_COUNTS_1000(
58 "PasswordProtection.NumberOfCachedVerdictBeforeShutdown", 58 "PasswordProtection.NumberOfCachedVerdictBeforeShutdown."
59 GetStoredVerdictCount()); 59 "PasswordOnFocus",
60 GetStoredVerdictCount(
61 LoginReputationClientRequest::UNFAMILIAR_LOGIN_PAGE));
62 UMA_HISTOGRAM_COUNTS_1000(
63 "PasswordProtection.NumberOfCachedVerdictBeforeShutdown."
64 "ProtectedPasswordEntry",
65 GetStoredVerdictCount(
66 LoginReputationClientRequest::PASSWORD_REUSE_EVENT));
60 } 67 }
61 } 68 }
62 69
63 void ChromePasswordProtectionService::FillReferrerChain( 70 void ChromePasswordProtectionService::FillReferrerChain(
64 const GURL& event_url, 71 const GURL& event_url,
65 int event_tab_id, 72 int event_tab_id,
66 LoginReputationClientRequest::Frame* frame) { 73 LoginReputationClientRequest::Frame* frame) {
67 DCHECK_CURRENTLY_ON(BrowserThread::UI); 74 DCHECK_CURRENTLY_ON(BrowserThread::UI);
68 SafeBrowsingNavigationObserverManager::AttributionResult result = 75 SafeBrowsingNavigationObserverManager::AttributionResult result =
69 navigation_observer_manager_->IdentifyReferrerChainByEventURL( 76 navigation_observer_manager_->IdentifyReferrerChainByEventURL(
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 web_contents->GetController().DiscardNonCommittedEntries(); 167 web_contents->GetController().DiscardNonCommittedEntries();
161 } 168 }
162 ui_manager_->DisplayBlockingPage(resource); 169 ui_manager_->DisplayBlockingPage(resource);
163 } 170 }
164 171
165 ChromePasswordProtectionService::ChromePasswordProtectionService( 172 ChromePasswordProtectionService::ChromePasswordProtectionService(
166 Profile* profile) 173 Profile* profile)
167 : PasswordProtectionService(nullptr, nullptr, nullptr, nullptr), 174 : PasswordProtectionService(nullptr, nullptr, nullptr, nullptr),
168 profile_(profile) {} 175 profile_(profile) {}
169 } // namespace safe_browsing 176 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698