| OLD | NEW |
| 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 #include "components/autofill/core/browser/autofill_manager.h" | 5 #include "components/autofill/core/browser/autofill_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 did_show_suggestions_(false), | 195 did_show_suggestions_(false), |
| 196 user_did_type_(false), | 196 user_did_type_(false), |
| 197 user_did_autofill_(false), | 197 user_did_autofill_(false), |
| 198 user_did_edit_autofilled_field_(false), | 198 user_did_edit_autofilled_field_(false), |
| 199 external_delegate_(NULL), | 199 external_delegate_(NULL), |
| 200 test_delegate_(NULL), | 200 test_delegate_(NULL), |
| 201 weak_ptr_factory_(this) { | 201 weak_ptr_factory_(this) { |
| 202 if (enable_download_manager == ENABLE_AUTOFILL_DOWNLOAD_MANAGER) { | 202 if (enable_download_manager == ENABLE_AUTOFILL_DOWNLOAD_MANAGER) { |
| 203 download_manager_.reset( | 203 download_manager_.reset( |
| 204 new AutofillDownloadManager( | 204 new AutofillDownloadManager( |
| 205 driver->GetWebContents()->GetBrowserContext(), this)); | 205 driver->GetWebContents()->GetBrowserContext(), |
| 206 manager_delegate_->GetPrefs(), |
| 207 this)); |
| 206 } | 208 } |
| 207 } | 209 } |
| 208 | 210 |
| 209 AutofillManager::~AutofillManager() {} | 211 AutofillManager::~AutofillManager() {} |
| 210 | 212 |
| 211 // static | 213 // static |
| 212 void AutofillManager::RegisterProfilePrefs( | 214 void AutofillManager::RegisterProfilePrefs( |
| 213 user_prefs::PrefRegistrySyncable* registry) { | 215 user_prefs::PrefRegistrySyncable* registry) { |
| 214 registry->RegisterBooleanPref( | 216 registry->RegisterBooleanPref( |
| 215 prefs::kAutofillEnabled, | 217 prefs::kAutofillEnabled, |
| (...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1172 return false; | 1174 return false; |
| 1173 | 1175 |
| 1174 // Disregard forms that we wouldn't ever autofill in the first place. | 1176 // Disregard forms that we wouldn't ever autofill in the first place. |
| 1175 if (!form.ShouldBeParsed(true)) | 1177 if (!form.ShouldBeParsed(true)) |
| 1176 return false; | 1178 return false; |
| 1177 | 1179 |
| 1178 return true; | 1180 return true; |
| 1179 } | 1181 } |
| 1180 | 1182 |
| 1181 } // namespace autofill | 1183 } // namespace autofill |
| OLD | NEW |