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

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

Issue 22009003: [Autofill] Distinguish between native field types and potentially HTML field types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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 | Annotate | Revision Log
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 <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
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/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.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 "components/autofill/content/browser/autocheckout_manager.h" 22 #include "components/autofill/content/browser/autocheckout_manager.h"
23 #include "components/autofill/core/browser/autocomplete_history_manager.h" 23 #include "components/autofill/core/browser/autocomplete_history_manager.h"
24 #include "components/autofill/core/browser/autofill_download.h" 24 #include "components/autofill/core/browser/autofill_download.h"
25 #include "components/autofill/core/browser/autofill_manager_delegate.h" 25 #include "components/autofill/core/browser/autofill_manager_delegate.h"
26 #include "components/autofill/core/browser/field_types.h"
27 #include "components/autofill/core/browser/form_structure.h" 26 #include "components/autofill/core/browser/form_structure.h"
28 #include "components/autofill/core/browser/personal_data_manager.h" 27 #include "components/autofill/core/browser/personal_data_manager.h"
29 #include "components/autofill/core/common/autocheckout_status.h" 28 #include "components/autofill/core/common/autocheckout_status.h"
30 #include "components/autofill/core/common/form_data.h" 29 #include "components/autofill/core/common/form_data.h"
31 #include "components/autofill/core/common/forms_seen_state.h" 30 #include "components/autofill/core/common/forms_seen_state.h"
32 #include "third_party/WebKit/public/web/WebFormElement.h" 31 #include "third_party/WebKit/public/web/WebFormElement.h"
33 32
34 class GURL; 33 class GURL;
35 34
36 namespace content { 35 namespace content {
(...skipping 10 matching lines...) Expand all
47 class PrefRegistrySyncable; 46 class PrefRegistrySyncable;
48 } 47 }
49 48
50 namespace autofill { 49 namespace autofill {
51 50
52 class AutofillDriver; 51 class AutofillDriver;
53 class AutofillDataModel; 52 class AutofillDataModel;
54 class AutofillDownloadManager; 53 class AutofillDownloadManager;
55 class AutofillExternalDelegate; 54 class AutofillExternalDelegate;
56 class AutofillField; 55 class AutofillField;
57 class AutofillProfile;
58 class AutofillManagerDelegate; 56 class AutofillManagerDelegate;
59 class AutofillManagerTestDelegate; 57 class AutofillManagerTestDelegate;
60 class AutofillMetrics; 58 class AutofillMetrics;
59 class AutofillProfile;
60 class AutofillType;
61 class CreditCard; 61 class CreditCard;
62 class FormStructureBrowserTest; 62 class FormStructureBrowserTest;
63 63
64 struct FormData; 64 struct FormData;
65 struct FormFieldData; 65 struct FormFieldData;
66 struct PasswordFormFillData; 66 struct PasswordFormFillData;
67 67
68 // Manages saving and restoring the user's personal information entered into web 68 // Manages saving and restoring the user's personal information entered into web
69 // forms. 69 // forms.
70 class AutofillManager : public AutofillDownloadManager::Observer { 70 class AutofillManager : public AutofillDownloadManager::Observer {
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // |updated_form|. Returns false if the cache could not be updated. 276 // |updated_form|. Returns false if the cache could not be updated.
277 bool UpdateCachedForm(const FormData& live_form, 277 bool UpdateCachedForm(const FormData& live_form,
278 const FormStructure* cached_form, 278 const FormStructure* cached_form,
279 FormStructure** updated_form) WARN_UNUSED_RESULT; 279 FormStructure** updated_form) WARN_UNUSED_RESULT;
280 280
281 // Returns a list of values from the stored profiles that match |type| and the 281 // Returns a list of values from the stored profiles that match |type| and the
282 // value of |field| and returns the labels of the matching profiles. |labels| 282 // value of |field| and returns the labels of the matching profiles. |labels|
283 // is filled with the Profile label. 283 // is filled with the Profile label.
284 void GetProfileSuggestions(FormStructure* form, 284 void GetProfileSuggestions(FormStructure* form,
285 const FormFieldData& field, 285 const FormFieldData& field,
286 AutofillFieldType type, 286 const AutofillType& type,
287 std::vector<base::string16>* values, 287 std::vector<base::string16>* values,
288 std::vector<base::string16>* labels, 288 std::vector<base::string16>* labels,
289 std::vector<base::string16>* icons, 289 std::vector<base::string16>* icons,
290 std::vector<int>* unique_ids) const; 290 std::vector<int>* unique_ids) const;
291 291
292 // Returns a list of values from the stored credit cards that match |type| and 292 // Returns a list of values from the stored credit cards that match |type| and
293 // the value of |field| and returns the labels of the matching credit cards. 293 // the value of |field| and returns the labels of the matching credit cards.
294 void GetCreditCardSuggestions(const FormFieldData& field, 294 void GetCreditCardSuggestions(const FormFieldData& field,
295 AutofillFieldType type, 295 const AutofillType& type,
296 std::vector<base::string16>* values, 296 std::vector<base::string16>* values,
297 std::vector<base::string16>* labels, 297 std::vector<base::string16>* labels,
298 std::vector<base::string16>* icons, 298 std::vector<base::string16>* icons,
299 std::vector<int>* unique_ids) const; 299 std::vector<int>* unique_ids) const;
300 300
301 // Parses the forms using heuristic matching and querying the Autofill server. 301 // Parses the forms using heuristic matching and querying the Autofill server.
302 void ParseForms(const std::vector<FormData>& forms); 302 void ParseForms(const std::vector<FormData>& forms);
303 303
304 // Imports the form data, submitted by the user, into |personal_data_|. 304 // Imports the form data, submitted by the user, into |personal_data_|.
305 void ImportFormData(const FormStructure& submitted_form); 305 void ImportFormData(const FormStructure& submitted_form);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 UserHappinessFormLoadAndSubmission); 398 UserHappinessFormLoadAndSubmission);
399 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); 399 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction);
400 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, 400 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest,
401 FormSubmittedAutocompleteEnabled); 401 FormSubmittedAutocompleteEnabled);
402 DISALLOW_COPY_AND_ASSIGN(AutofillManager); 402 DISALLOW_COPY_AND_ASSIGN(AutofillManager);
403 }; 403 };
404 404
405 } // namespace autofill 405 } // namespace autofill
406 406
407 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ 407 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698