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

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

Issue 10879037: Rename InfoBarTabService -> InfoBarService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix include guard Created 8 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 | 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>
11 #include <set> 11 #include <set>
12 #include <utility> 12 #include <utility>
13 13
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/guid.h" 16 #include "base/guid.h"
17 #include "base/logging.h" 17 #include "base/logging.h"
18 #include "base/string16.h" 18 #include "base/string16.h"
19 #include "base/string_util.h" 19 #include "base/string_util.h"
20 #include "base/threading/sequenced_worker_pool.h" 20 #include "base/threading/sequenced_worker_pool.h"
21 #include "base/utf_string_conversions.h" 21 #include "base/utf_string_conversions.h"
22 #include "chrome/browser/api/infobars/infobar_tab_service.h" 22 #include "chrome/browser/api/infobars/infobar_service.h"
23 #include "chrome/browser/autofill/api/autofill_manager_delegate.h" 23 #include "chrome/browser/autofill/api/autofill_manager_delegate.h"
24 #include "chrome/browser/autofill/autocomplete_history_manager.h" 24 #include "chrome/browser/autofill/autocomplete_history_manager.h"
25 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" 25 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h"
26 #include "chrome/browser/autofill/autofill_external_delegate.h" 26 #include "chrome/browser/autofill/autofill_external_delegate.h"
27 #include "chrome/browser/autofill/autofill_feedback_infobar_delegate.h" 27 #include "chrome/browser/autofill/autofill_feedback_infobar_delegate.h"
28 #include "chrome/browser/autofill/autofill_field.h" 28 #include "chrome/browser/autofill/autofill_field.h"
29 #include "chrome/browser/autofill/autofill_metrics.h" 29 #include "chrome/browser/autofill/autofill_metrics.h"
30 #include "chrome/browser/autofill/autofill_profile.h" 30 #include "chrome/browser/autofill/autofill_profile.h"
31 #include "chrome/browser/autofill/autofill_type.h" 31 #include "chrome/browser/autofill/autofill_type.h"
32 #include "chrome/browser/autofill/credit_card.h" 32 #include "chrome/browser/autofill/credit_card.h"
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 833
834 void AutofillManager::ImportFormData(const FormStructure& submitted_form) { 834 void AutofillManager::ImportFormData(const FormStructure& submitted_form) {
835 const CreditCard* imported_credit_card; 835 const CreditCard* imported_credit_card;
836 if (!personal_data_->ImportFormData(submitted_form, &imported_credit_card)) 836 if (!personal_data_->ImportFormData(submitted_form, &imported_credit_card))
837 return; 837 return;
838 838
839 // If credit card information was submitted, show an infobar to offer to save 839 // If credit card information was submitted, show an infobar to offer to save
840 // it. 840 // it.
841 scoped_ptr<const CreditCard> scoped_credit_card(imported_credit_card); 841 scoped_ptr<const CreditCard> scoped_credit_card(imported_credit_card);
842 if (imported_credit_card && web_contents()) { 842 if (imported_credit_card && web_contents()) {
843 InfoBarTabService* infobar_service = manager_delegate_->GetInfoBarService(); 843 InfoBarService* infobar_service = manager_delegate_->GetInfoBarService();
844 infobar_service->AddInfoBar( 844 infobar_service->AddInfoBar(
845 new AutofillCCInfoBarDelegate(infobar_service, 845 new AutofillCCInfoBarDelegate(infobar_service,
846 scoped_credit_card.release(), 846 scoped_credit_card.release(),
847 personal_data_, 847 personal_data_,
848 metric_logger_.get())); 848 metric_logger_.get()));
849 } 849 }
850 } 850 }
851 851
852 // Note that |submitted_form| is passed as a pointer rather than as a reference 852 // Note that |submitted_form| is passed as a pointer rather than as a reference
853 // so that we can get memory management right across threads. Note also that we 853 // so that we can get memory management right across threads. Note also that we
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 *profile_guid = IDToGUID(profile_id); 1410 *profile_guid = IDToGUID(profile_id);
1411 } 1411 }
1412 1412
1413 void AutofillManager::UpdateInitialInteractionTimestamp( 1413 void AutofillManager::UpdateInitialInteractionTimestamp(
1414 const TimeTicks& interaction_timestamp) { 1414 const TimeTicks& interaction_timestamp) {
1415 if (initial_interaction_timestamp_.is_null() || 1415 if (initial_interaction_timestamp_.is_null() ||
1416 interaction_timestamp < initial_interaction_timestamp_) { 1416 interaction_timestamp < initial_interaction_timestamp_) {
1417 initial_interaction_timestamp_ = interaction_timestamp; 1417 initial_interaction_timestamp_ = interaction_timestamp;
1418 } 1418 }
1419 } 1419 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_feedback_infobar_delegate.cc ('k') | chrome/browser/autofill/autofill_metrics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698