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

Side by Side Diff: components/password_manager/core/browser/password_autofill_manager.cc

Issue 2665313002: Add a counter for clicking on Form-Not-Secure warnings (Closed)
Patch Set: rebase fixup again Created 3 years, 10 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 "components/password_manager/core/browser/password_autofill_manager.h" 5 #include "components/password_manager/core/browser/password_autofill_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 return; 285 return;
286 bool success = 286 bool success =
287 PreviewSuggestion(form_data_key_, GetUsernameFromSuggestion(value)); 287 PreviewSuggestion(form_data_key_, GetUsernameFromSuggestion(value));
288 DCHECK(success); 288 DCHECK(success);
289 } 289 }
290 290
291 void PasswordAutofillManager::DidAcceptSuggestion(const base::string16& value, 291 void PasswordAutofillManager::DidAcceptSuggestion(const base::string16& value,
292 int identifier, 292 int identifier,
293 int position) { 293 int position) {
294 if (identifier == autofill::POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE) { 294 if (identifier == autofill::POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE) {
295 metrics_util::LogShowedHttpNotSecureExplanation();
295 autofill_client_->ShowHttpNotSecureExplanation(); 296 autofill_client_->ShowHttpNotSecureExplanation();
296 } else { 297 } else {
297 bool success = 298 bool success =
298 FillSuggestion(form_data_key_, GetUsernameFromSuggestion(value)); 299 FillSuggestion(form_data_key_, GetUsernameFromSuggestion(value));
299 DCHECK(success); 300 DCHECK(success);
300 } 301 }
301 autofill_client_->HideAutofillPopup(); 302 autofill_client_->HideAutofillPopup();
302 } 303 }
303 304
304 bool PasswordAutofillManager::GetDeletionConfirmationText( 305 bool PasswordAutofillManager::GetDeletionConfirmationText(
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 autofill::PasswordFormFillData* found_password) { 374 autofill::PasswordFormFillData* found_password) {
374 LoginToPasswordInfoMap::iterator iter = login_to_password_info_.find(key); 375 LoginToPasswordInfoMap::iterator iter = login_to_password_info_.find(key);
375 if (iter == login_to_password_info_.end()) 376 if (iter == login_to_password_info_.end())
376 return false; 377 return false;
377 378
378 *found_password = iter->second; 379 *found_password = iter->second;
379 return true; 380 return true;
380 } 381 }
381 382
382 } // namespace password_manager 383 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698