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

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

Issue 2026353002: [Autofill] Credit Card Assist Infobar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bool fix Created 4 years, 4 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/callback_forward.h" 14 #include "base/callback_forward.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/gtest_prod_util.h" 16 #include "base/gtest_prod_util.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/scoped_vector.h" 18 #include "base/memory/scoped_vector.h"
19 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
20 #include "base/strings/string16.h" 20 #include "base/strings/string16.h"
21 #include "base/time/time.h" 21 #include "base/time/time.h"
22 #include "build/build_config.h" 22 #include "build/build_config.h"
23 #include "components/autofill/core/browser/assist_manager.h"
23 #include "components/autofill/core/browser/autocomplete_history_manager.h" 24 #include "components/autofill/core/browser/autocomplete_history_manager.h"
24 #include "components/autofill/core/browser/autofill_client.h" 25 #include "components/autofill/core/browser/autofill_client.h"
25 #include "components/autofill/core/browser/autofill_download_manager.h" 26 #include "components/autofill/core/browser/autofill_download_manager.h"
26 #include "components/autofill/core/browser/autofill_driver.h" 27 #include "components/autofill/core/browser/autofill_driver.h"
27 #include "components/autofill/core/browser/autofill_metrics.h" 28 #include "components/autofill/core/browser/autofill_metrics.h"
28 #include "components/autofill/core/browser/card_unmask_delegate.h" 29 #include "components/autofill/core/browser/card_unmask_delegate.h"
29 #include "components/autofill/core/browser/form_structure.h" 30 #include "components/autofill/core/browser/form_structure.h"
30 #include "components/autofill/core/browser/payments/full_card_request.h" 31 #include "components/autofill/core/browser/payments/full_card_request.h"
31 #include "components/autofill/core/browser/payments/payments_client.h" 32 #include "components/autofill/core/browser/payments/payments_client.h"
32 #include "components/autofill/core/browser/personal_data_manager.h" 33 #include "components/autofill/core/browser/personal_data_manager.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // Methods for packing and unpacking credit card and profile IDs for sending 245 // Methods for packing and unpacking credit card and profile IDs for sending
245 // and receiving to and from the renderer process. 246 // and receiving to and from the renderer process.
246 int MakeFrontendID(const std::string& cc_backend_id, 247 int MakeFrontendID(const std::string& cc_backend_id,
247 const std::string& profile_backend_id) const; 248 const std::string& profile_backend_id) const;
248 void SplitFrontendID(int frontend_id, 249 void SplitFrontendID(int frontend_id,
249 std::string* cc_backend_id, 250 std::string* cc_backend_id,
250 std::string* profile_backend_id) const; 251 std::string* profile_backend_id) const;
251 252
252 ScopedVector<FormStructure>* form_structures() { return &form_structures_; } 253 ScopedVector<FormStructure>* form_structures() { return &form_structures_; }
253 254
254 protected:
255 // Exposed for testing. 255 // Exposed for testing.
256 AutofillExternalDelegate* external_delegate() { 256 AutofillExternalDelegate* external_delegate() {
257 return external_delegate_; 257 return external_delegate_;
258 } 258 }
259 259
260 // Exposed for testing. 260 // Exposed for testing.
261 void set_download_manager(AutofillDownloadManager* manager) { 261 void set_download_manager(AutofillDownloadManager* manager) {
262 download_manager_.reset(manager); 262 download_manager_.reset(manager);
263 } 263 }
264 264
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 mutable std::map<std::string, int> backend_to_int_map_; 528 mutable std::map<std::string, int> backend_to_int_map_;
529 mutable std::map<int, std::string> int_to_backend_map_; 529 mutable std::map<int, std::string> int_to_backend_map_;
530 530
531 // Delegate to perform external processing (display, selection) on 531 // Delegate to perform external processing (display, selection) on
532 // our behalf. Weak. 532 // our behalf. Weak.
533 AutofillExternalDelegate* external_delegate_; 533 AutofillExternalDelegate* external_delegate_;
534 534
535 // Delegate used in test to get notifications on certain events. 535 // Delegate used in test to get notifications on certain events.
536 AutofillManagerTestDelegate* test_delegate_; 536 AutofillManagerTestDelegate* test_delegate_;
537 537
538 AssistManager assist_manager_;
539
538 base::WeakPtrFactory<AutofillManager> weak_ptr_factory_; 540 base::WeakPtrFactory<AutofillManager> weak_ptr_factory_;
539 541
540 friend class AutofillManagerTest; 542 friend class AutofillManagerTest;
541 friend class FormStructureBrowserTest; 543 friend class FormStructureBrowserTest;
542 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, 544 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest,
543 DeterminePossibleFieldTypesForUpload); 545 DeterminePossibleFieldTypesForUpload);
544 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, 546 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest,
545 DeterminePossibleFieldTypesForUploadStressTest); 547 DeterminePossibleFieldTypesForUploadStressTest);
546 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DisambiguateUploadTypes); 548 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DisambiguateUploadTypes);
547 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, 549 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, 604 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest,
603 DontSaveCvcInAutocompleteHistory); 605 DontSaveCvcInAutocompleteHistory);
604 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); 606 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard);
605 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); 607 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate);
606 DISALLOW_COPY_AND_ASSIGN(AutofillManager); 608 DISALLOW_COPY_AND_ASSIGN(AutofillManager);
607 }; 609 };
608 610
609 } // namespace autofill 611 } // namespace autofill
610 612
611 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ 613 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698