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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 } | 158 } |
159 | 159 |
160 // static | 160 // static |
161 void AutoFillManager::RegisterUserPrefs(PrefService* prefs) { | 161 void AutoFillManager::RegisterUserPrefs(PrefService* prefs) { |
162 prefs->RegisterBooleanPref(prefs::kAutoFillEnabled, true); | 162 prefs->RegisterBooleanPref(prefs::kAutoFillEnabled, true); |
163 #if defined(OS_MACOSX) | 163 #if defined(OS_MACOSX) |
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->RegisterDoublePref(prefs::kAutoFillPositiveUploadRate, |
169 kAutoFillPositiveUploadRateDefaultValue); | 169 kAutoFillPositiveUploadRateDefaultValue); |
170 prefs->RegisterRealPref(prefs::kAutoFillNegativeUploadRate, | 170 prefs->RegisterDoublePref(prefs::kAutoFillNegativeUploadRate, |
171 kAutoFillNegativeUploadRateDefaultValue); | 171 kAutoFillNegativeUploadRateDefaultValue); |
172 } | 172 } |
173 | 173 |
174 void AutoFillManager::DidNavigateMainFramePostCommit( | 174 void AutoFillManager::DidNavigateMainFramePostCommit( |
175 const NavigationController::LoadCommittedDetails& details, | 175 const NavigationController::LoadCommittedDetails& details, |
176 const ViewHostMsg_FrameNavigate_Params& params) { | 176 const ViewHostMsg_FrameNavigate_Params& params) { |
177 Reset(); | 177 Reset(); |
178 } | 178 } |
179 | 179 |
180 bool AutoFillManager::OnMessageReceived(const IPC::Message& message) { | 180 bool AutoFillManager::OnMessageReceived(const IPC::Message& message) { |
181 bool handled = true; | 181 bool handled = true; |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 return std::string(); | 911 return std::string(); |
912 | 912 |
913 std::map<int, std::string>::const_iterator iter = id_guid_map_.find(id); | 913 std::map<int, std::string>::const_iterator iter = id_guid_map_.find(id); |
914 if (iter == id_guid_map_.end()) { | 914 if (iter == id_guid_map_.end()) { |
915 NOTREACHED(); | 915 NOTREACHED(); |
916 return std::string(); | 916 return std::string(); |
917 } | 917 } |
918 | 918 |
919 return iter->second; | 919 return iter->second; |
920 } | 920 } |
OLD | NEW |