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

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

Issue 6368011: Clean up WebNavigationObserver by taking out password specific callbacks, and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 #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
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
180 void AutoFillManager::TranslateStarted() {
181 // Ideally we'd have a better way to uniquely identify form control elements,
182 // but we don't have that yet. So before start translation, we clear the
183 // current form and re-parse it first to get the new labels.
184 Reset();
185 }
186
174 bool AutoFillManager::OnMessageReceived(const IPC::Message& message) { 187 bool AutoFillManager::OnMessageReceived(const IPC::Message& message) {
175 bool handled = true; 188 bool handled = true;
176 IPC_BEGIN_MESSAGE_MAP(AutoFillManager, message) 189 IPC_BEGIN_MESSAGE_MAP(AutoFillManager, message)
177 IPC_MESSAGE_HANDLER(ViewHostMsg_FormsSeen, OnFormsSeen) 190 IPC_MESSAGE_HANDLER(ViewHostMsg_FormsSeen, OnFormsSeen)
178 IPC_MESSAGE_HANDLER(ViewHostMsg_FormSubmitted, OnFormSubmitted) 191 IPC_MESSAGE_HANDLER(ViewHostMsg_FormSubmitted, OnFormSubmitted)
179 IPC_MESSAGE_HANDLER(ViewHostMsg_QueryFormFieldAutoFill, 192 IPC_MESSAGE_HANDLER(ViewHostMsg_QueryFormFieldAutoFill,
180 OnQueryFormFieldAutoFill) 193 OnQueryFormFieldAutoFill)
181 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowAutoFillDialog, OnShowAutoFillDialog) 194 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowAutoFillDialog, OnShowAutoFillDialog)
182 IPC_MESSAGE_HANDLER(ViewHostMsg_FillAutoFillFormData, 195 IPC_MESSAGE_HANDLER(ViewHostMsg_FillAutoFillFormData,
183 OnFillAutoFillFormData) 196 OnFillAutoFillFormData)
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 return std::string(); 899 return std::string();
887 900
888 std::map<int, std::string>::const_iterator iter = id_guid_map_.find(id); 901 std::map<int, std::string>::const_iterator iter = id_guid_map_.find(id);
889 if (iter == id_guid_map_.end()) { 902 if (iter == id_guid_map_.end()) {
890 NOTREACHED(); 903 NOTREACHED();
891 return std::string(); 904 return std::string();
892 } 905 }
893 906
894 return iter->second; 907 return iter->second;
895 } 908 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698