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

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

Issue 1902003: Revert 46424 - AutoFill profile shouldn't be saved when cancelled during init... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 7 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 #include <string> 9 #include <string>
10 10
(...skipping 15 matching lines...) Expand all
26 struct FormData; 26 struct FormData;
27 class FormField; 27 class FormField;
28 } // namespace webkit_glue 28 } // namespace webkit_glue
29 29
30 // TODO(jhawkins): Maybe this should be in a grd file? 30 // TODO(jhawkins): Maybe this should be in a grd file?
31 extern const char* kAutoFillLearnMoreUrl; 31 extern const char* kAutoFillLearnMoreUrl;
32 32
33 // Manages saving and restoring the user's personal information entered into web 33 // Manages saving and restoring the user's personal information entered into web
34 // forms. 34 // forms.
35 class AutoFillManager : public RenderViewHostDelegate::AutoFill, 35 class AutoFillManager : public RenderViewHostDelegate::AutoFill,
36 public PersonalDataManager::Observer,
36 public AutoFillDownloadManager::Observer { 37 public AutoFillDownloadManager::Observer {
37 public: 38 public:
38 explicit AutoFillManager(TabContents* tab_contents); 39 explicit AutoFillManager(TabContents* tab_contents);
39 virtual ~AutoFillManager(); 40 virtual ~AutoFillManager();
40 41
41 // Registers our browser prefs. 42 // Registers our browser prefs.
42 static void RegisterBrowserPrefs(PrefService* prefs); 43 static void RegisterBrowserPrefs(PrefService* prefs);
43 44
44 // Registers our Enable/Disable AutoFill pref. 45 // Registers our Enable/Disable AutoFill pref.
45 static void RegisterUserPrefs(PrefService* prefs); 46 static void RegisterUserPrefs(PrefService* prefs);
46 47
47 // RenderViewHostDelegate::AutoFill implementation: 48 // RenderViewHostDelegate::AutoFill implementation:
48 virtual void FormSubmitted(const webkit_glue::FormData& form); 49 virtual void FormSubmitted(const webkit_glue::FormData& form);
49 virtual void FormsSeen( 50 virtual void FormsSeen(
50 const std::vector<webkit_glue::FormData>& forms); 51 const std::vector<webkit_glue::FormData>& forms);
51 virtual bool GetAutoFillSuggestions(int query_id, 52 virtual bool GetAutoFillSuggestions(int query_id,
52 const webkit_glue::FormField& field); 53 const webkit_glue::FormField& field);
53 virtual bool FillAutoFillFormData(int query_id, 54 virtual bool FillAutoFillFormData(int query_id,
54 const webkit_glue::FormData& form, 55 const webkit_glue::FormData& form,
55 const string16& value, 56 const string16& value,
56 const string16& label); 57 const string16& label);
57 58
59 // PersonalDataManager::Observer implementation:
60 virtual void OnPersonalDataLoaded();
61
58 // Called by the AutoFillInfoBarDelegate when the user closes the infobar. 62 // Called by the AutoFillInfoBarDelegate when the user closes the infobar.
59 virtual void OnInfoBarClosed(); 63 virtual void OnInfoBarClosed();
60 64
61 // Called by the AutoFillInfoBarDelegate when the user accepts the infobar. 65 // Called by the AutoFillInfoBarDelegate when the user accepts the infobar.
62 virtual void OnInfoBarAccepted(); 66 virtual void OnInfoBarAccepted();
63 67
64 // Called by the AutoFillInfoBarDelegate when the user cancels the infobar. 68 // Called by the AutoFillInfoBarDelegate when the user cancels the infobar.
65 virtual void OnInfoBarCancelled(); 69 virtual void OnInfoBarCancelled();
66 70
67 // Resets the stored form data. 71 // Resets the stored form data.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // The form data the user has submitted. 141 // The form data the user has submitted.
138 scoped_ptr<FormStructure> upload_form_structure_; 142 scoped_ptr<FormStructure> upload_form_structure_;
139 143
140 // The InfoBar that asks for permission to store form information. 144 // The InfoBar that asks for permission to store form information.
141 scoped_ptr<AutoFillInfoBarDelegate> infobar_; 145 scoped_ptr<AutoFillInfoBarDelegate> infobar_;
142 146
143 DISALLOW_COPY_AND_ASSIGN(AutoFillManager); 147 DISALLOW_COPY_AND_ASSIGN(AutoFillManager);
144 }; 148 };
145 149
146 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ 150 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_dialog_mac.mm ('k') | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698