OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_manager.h" | 5 #include "chrome/browser/autofill_manager.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "chrome/browser/profile.h" | 8 #include "chrome/browser/profile.h" |
9 #include "chrome/browser/tab_contents/web_contents.h" | 9 #include "chrome/browser/tab_contents/web_contents.h" |
10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
11 #include "chrome/common/pref_service.h" | 11 #include "chrome/common/pref_service.h" |
| 12 #include "webkit/glue/autofill_form.h" |
12 | 13 |
13 // static | 14 // static |
14 void AutofillManager::RegisterUserPrefs(PrefService* prefs) { | 15 void AutofillManager::RegisterUserPrefs(PrefService* prefs) { |
15 prefs->RegisterBooleanPref(prefs::kFormAutofillEnabled, true); | 16 prefs->RegisterBooleanPref(prefs::kFormAutofillEnabled, true); |
16 } | 17 } |
17 | 18 |
18 AutofillManager::AutofillManager(WebContents* web_contents) : | 19 AutofillManager::AutofillManager(WebContents* web_contents) : |
19 web_contents_(web_contents), | 20 web_contents_(web_contents), |
20 pending_query_handle_(0), | 21 pending_query_handle_(0), |
21 node_id_(0), | 22 node_id_(0), |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 const AutofillForm& form) { | 108 const AutofillForm& form) { |
108 if (!*form_autofill_enabled_) | 109 if (!*form_autofill_enabled_) |
109 return; | 110 return; |
110 | 111 |
111 if (profile()->IsOffTheRecord()) | 112 if (profile()->IsOffTheRecord()) |
112 return; | 113 return; |
113 | 114 |
114 profile()->GetWebDataService(Profile::EXPLICIT_ACCESS)-> | 115 profile()->GetWebDataService(Profile::EXPLICIT_ACCESS)-> |
115 AddAutofillFormElements(form.elements); | 116 AddAutofillFormElements(form.elements); |
116 } | 117 } |
117 | |
OLD | NEW |