OLD | NEW |
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 #include "chrome/browser/autofill/autofill_manager.h" | 5 #include "chrome/browser/autofill/autofill_manager.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 prefs->RegisterBooleanPref(prefs::kAutoFillAuxiliaryProfilesEnabled, true); | 164 prefs->RegisterBooleanPref(prefs::kAutoFillAuxiliaryProfilesEnabled, true); |
165 #else | 165 #else |
166 prefs->RegisterBooleanPref(prefs::kAutoFillAuxiliaryProfilesEnabled, false); | 166 prefs->RegisterBooleanPref(prefs::kAutoFillAuxiliaryProfilesEnabled, false); |
167 #endif | 167 #endif |
168 prefs->RegisterRealPref(prefs::kAutoFillPositiveUploadRate, | 168 prefs->RegisterRealPref(prefs::kAutoFillPositiveUploadRate, |
169 kAutoFillPositiveUploadRateDefaultValue); | 169 kAutoFillPositiveUploadRateDefaultValue); |
170 prefs->RegisterRealPref(prefs::kAutoFillNegativeUploadRate, | 170 prefs->RegisterRealPref(prefs::kAutoFillNegativeUploadRate, |
171 kAutoFillNegativeUploadRateDefaultValue); | 171 kAutoFillNegativeUploadRateDefaultValue); |
172 } | 172 } |
173 | 173 |
| 174 void AutoFillManager::DidNavigateMainFramePostCommit( |
| 175 const NavigationController::LoadCommittedDetails& details, |
| 176 const ViewHostMsg_FrameNavigate_Params& params) { |
| 177 Reset(); |
| 178 } |
| 179 |
174 bool AutoFillManager::OnMessageReceived(const IPC::Message& message) { | 180 bool AutoFillManager::OnMessageReceived(const IPC::Message& message) { |
175 bool handled = true; | 181 bool handled = true; |
176 IPC_BEGIN_MESSAGE_MAP(AutoFillManager, message) | 182 IPC_BEGIN_MESSAGE_MAP(AutoFillManager, message) |
177 IPC_MESSAGE_HANDLER(ViewHostMsg_FormsSeen, OnFormsSeen) | 183 IPC_MESSAGE_HANDLER(ViewHostMsg_FormsSeen, OnFormsSeen) |
178 IPC_MESSAGE_HANDLER(ViewHostMsg_FormSubmitted, OnFormSubmitted) | 184 IPC_MESSAGE_HANDLER(ViewHostMsg_FormSubmitted, OnFormSubmitted) |
179 IPC_MESSAGE_HANDLER(ViewHostMsg_QueryFormFieldAutoFill, | 185 IPC_MESSAGE_HANDLER(ViewHostMsg_QueryFormFieldAutoFill, |
180 OnQueryFormFieldAutoFill) | 186 OnQueryFormFieldAutoFill) |
181 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowAutoFillDialog, OnShowAutoFillDialog) | 187 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowAutoFillDialog, OnShowAutoFillDialog) |
182 IPC_MESSAGE_HANDLER(ViewHostMsg_FillAutoFillFormData, | 188 IPC_MESSAGE_HANDLER(ViewHostMsg_FillAutoFillFormData, |
183 OnFillAutoFillFormData) | 189 OnFillAutoFillFormData) |
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 return std::string(); | 892 return std::string(); |
887 | 893 |
888 std::map<int, std::string>::const_iterator iter = id_guid_map_.find(id); | 894 std::map<int, std::string>::const_iterator iter = id_guid_map_.find(id); |
889 if (iter == id_guid_map_.end()) { | 895 if (iter == id_guid_map_.end()) { |
890 NOTREACHED(); | 896 NOTREACHED(); |
891 return std::string(); | 897 return std::string(); |
892 } | 898 } |
893 | 899 |
894 return iter->second; | 900 return iter->second; |
895 } | 901 } |
OLD | NEW |