| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #include "grit/generated_resources.h" | 53 #include "grit/generated_resources.h" |
| 54 #include "ipc/ipc_message_macros.h" | 54 #include "ipc/ipc_message_macros.h" |
| 55 #include "ui/base/l10n/l10n_util.h" | 55 #include "ui/base/l10n/l10n_util.h" |
| 56 #include "ui/gfx/rect.h" | 56 #include "ui/gfx/rect.h" |
| 57 #include "webkit/forms/form_data.h" | 57 #include "webkit/forms/form_data.h" |
| 58 #include "webkit/forms/form_data_predictions.h" | 58 #include "webkit/forms/form_data_predictions.h" |
| 59 #include "webkit/forms/form_field.h" | 59 #include "webkit/forms/form_field.h" |
| 60 | 60 |
| 61 using base::TimeTicks; | 61 using base::TimeTicks; |
| 62 using content::BrowserThread; | 62 using content::BrowserThread; |
| 63 using content::RenderViewHost; |
| 63 using switches::kEnableAutofillFeedback; | 64 using switches::kEnableAutofillFeedback; |
| 64 using webkit::forms::FormData; | 65 using webkit::forms::FormData; |
| 65 using webkit::forms::FormDataPredictions; | 66 using webkit::forms::FormDataPredictions; |
| 66 using webkit::forms::FormField; | 67 using webkit::forms::FormField; |
| 67 | 68 |
| 68 namespace { | 69 namespace { |
| 69 | 70 |
| 70 // We only send a fraction of the forms to upload server. | 71 // We only send a fraction of the forms to upload server. |
| 71 // The rate for positive/negative matches potentially could be different. | 72 // The rate for positive/negative matches potentially could be different. |
| 72 const double kAutofillPositiveUploadRateDefaultValue = 0.20; | 73 const double kAutofillPositiveUploadRateDefaultValue = 0.20; |
| (...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1300 *profile_guid = IDToGUID(profile_id); | 1301 *profile_guid = IDToGUID(profile_id); |
| 1301 } | 1302 } |
| 1302 | 1303 |
| 1303 void AutofillManager::UpdateInitialInteractionTimestamp( | 1304 void AutofillManager::UpdateInitialInteractionTimestamp( |
| 1304 const TimeTicks& interaction_timestamp) { | 1305 const TimeTicks& interaction_timestamp) { |
| 1305 if (initial_interaction_timestamp_.is_null() || | 1306 if (initial_interaction_timestamp_.is_null() || |
| 1306 interaction_timestamp < initial_interaction_timestamp_) { | 1307 interaction_timestamp < initial_interaction_timestamp_) { |
| 1307 initial_interaction_timestamp_ = interaction_timestamp; | 1308 initial_interaction_timestamp_ = interaction_timestamp; |
| 1308 } | 1309 } |
| 1309 } | 1310 } |
| OLD | NEW |