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

Side by Side Diff: chrome/browser/autofill/autofill_manager.cc

Issue 10458018: This CL does the following: (1) Pass the max_length attribute to the password generator; (2) Update… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a bug in Windows UI. Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/autofill/autofill_manager.h" 5 #include "chrome/browser/autofill/autofill_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <map> 10 #include <map>
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 AutofillMetrics::SUGGESTIONS_SHOWN_ONCE); 710 AutofillMetrics::SUGGESTIONS_SHOWN_ONCE);
711 } 711 }
712 } 712 }
713 } 713 }
714 714
715 void AutofillManager::OnHideAutofillPopup() { 715 void AutofillManager::OnHideAutofillPopup() {
716 if (external_delegate_) 716 if (external_delegate_)
717 external_delegate_->HideAutofillPopup(); 717 external_delegate_->HideAutofillPopup();
718 } 718 }
719 719
720 void AutofillManager::OnShowPasswordGenerationPopup(const gfx::Rect& bounds) { 720 void AutofillManager::OnShowPasswordGenerationPopup(const gfx::Rect& bounds,
721 int max_length) {
721 #if defined(OS_ANDROID) 722 #if defined(OS_ANDROID)
722 NOTIMPLEMENTED(); 723 NOTIMPLEMENTED();
723 #else 724 #else
724 Browser* browser = browser::FindLastActiveWithProfile( 725 Browser* browser = browser::FindLastActiveWithProfile(
725 Profile::FromBrowserContext(web_contents()->GetBrowserContext())); 726 Profile::FromBrowserContext(web_contents()->GetBrowserContext()));
726 browser->window()->ShowPasswordGenerationBubble(bounds); 727 browser->window()->ShowPasswordGenerationBubble(bounds, max_length);
Garrett Casto 2012/05/30 00:46:35 Note that if we end up having the password generat
zysxqn 2012/05/31 21:54:08 Why can't we create a PasswordGenerator directly h
727 #endif // #if defined(OS_ANDROID) 728 #endif // #if defined(OS_ANDROID)
728 } 729 }
729 730
730 void AutofillManager::RemoveAutofillProfileOrCreditCard(int unique_id) { 731 void AutofillManager::RemoveAutofillProfileOrCreditCard(int unique_id) {
731 const std::vector<AutofillProfile*>& profiles = personal_data_->profiles(); 732 const std::vector<AutofillProfile*>& profiles = personal_data_->profiles();
732 const std::vector<CreditCard*>& credit_cards = personal_data_->credit_cards(); 733 const std::vector<CreditCard*>& credit_cards = personal_data_->credit_cards();
733 const AutofillProfile* profile = NULL; 734 const AutofillProfile* profile = NULL;
734 const CreditCard* credit_card = NULL; 735 const CreditCard* credit_card = NULL;
735 size_t variant = 0; 736 size_t variant = 0;
736 if (!GetProfileOrCreditCard(unique_id, profiles, credit_cards, &profile, 737 if (!GetProfileOrCreditCard(unique_id, profiles, credit_cards, &profile,
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 *profile_guid = IDToGUID(profile_id); 1383 *profile_guid = IDToGUID(profile_id);
1383 } 1384 }
1384 1385
1385 void AutofillManager::UpdateInitialInteractionTimestamp( 1386 void AutofillManager::UpdateInitialInteractionTimestamp(
1386 const TimeTicks& interaction_timestamp) { 1387 const TimeTicks& interaction_timestamp) {
1387 if (initial_interaction_timestamp_.is_null() || 1388 if (initial_interaction_timestamp_.is_null() ||
1388 interaction_timestamp < initial_interaction_timestamp_) { 1389 interaction_timestamp < initial_interaction_timestamp_) {
1389 initial_interaction_timestamp_ = interaction_timestamp; 1390 initial_interaction_timestamp_ = interaction_timestamp;
1390 } 1391 }
1391 } 1392 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698