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

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

Issue 1930002: AutoFill profile shouldn't be saved when cancelled during initial setup. (Closed)
Patch Set: Addressing review comments. Polishing unit test comments. 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
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,
37 public AutoFillDownloadManager::Observer { 36 public AutoFillDownloadManager::Observer {
38 public: 37 public:
39 explicit AutoFillManager(TabContents* tab_contents); 38 explicit AutoFillManager(TabContents* tab_contents);
40 virtual ~AutoFillManager(); 39 virtual ~AutoFillManager();
41 40
42 // Registers our browser prefs. 41 // Registers our browser prefs.
43 static void RegisterBrowserPrefs(PrefService* prefs); 42 static void RegisterBrowserPrefs(PrefService* prefs);
44 43
45 // Registers our Enable/Disable AutoFill pref. 44 // Registers our Enable/Disable AutoFill pref.
46 static void RegisterUserPrefs(PrefService* prefs); 45 static void RegisterUserPrefs(PrefService* prefs);
47 46
48 // RenderViewHostDelegate::AutoFill implementation: 47 // RenderViewHostDelegate::AutoFill implementation:
49 virtual void FormSubmitted(const webkit_glue::FormData& form); 48 virtual void FormSubmitted(const webkit_glue::FormData& form);
50 virtual void FormsSeen( 49 virtual void FormsSeen(
51 const std::vector<webkit_glue::FormData>& forms); 50 const std::vector<webkit_glue::FormData>& forms);
52 virtual bool GetAutoFillSuggestions(int query_id, 51 virtual bool GetAutoFillSuggestions(int query_id,
53 const webkit_glue::FormField& field); 52 const webkit_glue::FormField& field);
54 virtual bool FillAutoFillFormData(int query_id, 53 virtual bool FillAutoFillFormData(int query_id,
55 const webkit_glue::FormData& form, 54 const webkit_glue::FormData& form,
56 const string16& value, 55 const string16& value,
57 const string16& label); 56 const string16& label);
58 57
59 // PersonalDataManager::Observer implementation:
60 virtual void OnPersonalDataLoaded();
61
62 // Called by the AutoFillInfoBarDelegate when the user closes the infobar. 58 // Called by the AutoFillInfoBarDelegate when the user closes the infobar.
63 virtual void OnInfoBarClosed(); 59 virtual void OnInfoBarClosed();
64 60
65 // Called by the AutoFillInfoBarDelegate when the user accepts the infobar. 61 // Called by the AutoFillInfoBarDelegate when the user accepts the infobar.
66 virtual void OnInfoBarAccepted(); 62 virtual void OnInfoBarAccepted();
67 63
68 // Called by the AutoFillInfoBarDelegate when the user cancels the infobar. 64 // Called by the AutoFillInfoBarDelegate when the user cancels the infobar.
69 virtual void OnInfoBarCancelled(); 65 virtual void OnInfoBarCancelled();
70 66
71 // Resets the stored form data. 67 // Resets the stored form data.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // The form data the user has submitted. 137 // The form data the user has submitted.
142 scoped_ptr<FormStructure> upload_form_structure_; 138 scoped_ptr<FormStructure> upload_form_structure_;
143 139
144 // The InfoBar that asks for permission to store form information. 140 // The InfoBar that asks for permission to store form information.
145 scoped_ptr<AutoFillInfoBarDelegate> infobar_; 141 scoped_ptr<AutoFillInfoBarDelegate> infobar_;
146 142
147 DISALLOW_COPY_AND_ASSIGN(AutoFillManager); 143 DISALLOW_COPY_AND_ASSIGN(AutoFillManager);
148 }; 144 };
149 145
150 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ 146 #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