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

Side by Side Diff: components/autofill/core/browser/autofill_manager.cc

Issue 710453002: [Autofill] Componentize AutofillCCInfoBarDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove infobar if its associated page content is destroyed. Created 5 years, 11 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/autofill/core/browser/autofill_manager.h" 5 #include "components/autofill/core/browser/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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 665
666 void AutofillManager::ImportFormData(const FormStructure& submitted_form) { 666 void AutofillManager::ImportFormData(const FormStructure& submitted_form) {
667 scoped_ptr<CreditCard> imported_credit_card; 667 scoped_ptr<CreditCard> imported_credit_card;
668 if (!personal_data_->ImportFormData(submitted_form, &imported_credit_card)) 668 if (!personal_data_->ImportFormData(submitted_form, &imported_credit_card))
669 return; 669 return;
670 670
671 // If credit card information was submitted, we need to confirm whether to 671 // If credit card information was submitted, we need to confirm whether to
672 // save it. 672 // save it.
673 if (imported_credit_card) { 673 if (imported_credit_card) {
674 client_->ConfirmSaveCreditCard( 674 client_->ConfirmSaveCreditCard(
675 driver_,
675 base::Bind( 676 base::Bind(
676 base::IgnoreResult(&PersonalDataManager::SaveImportedCreditCard), 677 base::IgnoreResult(&PersonalDataManager::SaveImportedCreditCard),
677 base::Unretained(personal_data_), 678 base::Unretained(personal_data_), *imported_credit_card));
678 *imported_credit_card));
679 } 679 }
680 } 680 }
681 681
682 // Note that |submitted_form| is passed as a pointer rather than as a reference 682 // Note that |submitted_form| is passed as a pointer rather than as a reference
683 // so that we can get memory management right across threads. Note also that we 683 // so that we can get memory management right across threads. Note also that we
684 // explicitly pass in all the time stamps of interest, as the cached ones might 684 // explicitly pass in all the time stamps of interest, as the cached ones might
685 // get reset before this method executes. 685 // get reset before this method executes.
686 void AutofillManager::UploadFormDataAsyncCallback( 686 void AutofillManager::UploadFormDataAsyncCallback(
687 const FormStructure* submitted_form, 687 const FormStructure* submitted_form,
688 const TimeTicks& load_time, 688 const TimeTicks& load_time,
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 return false; 1247 return false;
1248 1248
1249 // Disregard forms that we wouldn't ever autofill in the first place. 1249 // Disregard forms that we wouldn't ever autofill in the first place.
1250 if (!form.ShouldBeParsed()) 1250 if (!form.ShouldBeParsed())
1251 return false; 1251 return false;
1252 1252
1253 return true; 1253 return true;
1254 } 1254 }
1255 1255
1256 } // namespace autofill 1256 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698