summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/autofill_download.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autofill/autofill_download.cc')
-rw-r--r--chrome/browser/autofill/autofill_download.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/autofill/autofill_download.cc b/chrome/browser/autofill/autofill_download.cc
index 66d6459..091c0ec 100644
--- a/chrome/browser/autofill/autofill_download.cc
+++ b/chrome/browser/autofill/autofill_download.cc
@@ -32,6 +32,12 @@ struct AutoFillDownloadManager::FormRequestData {
AutoFillRequestType request_type;
};
+#ifdef ANDROID
+// Taken from autofill_manager.cc
+const double kAutoFillPositiveUploadRateDefaultValue = 0.01;
+const double kAutoFillNegativeUploadRateDefaultValue = 0.01;
+#endif
+
AutoFillDownloadManager::AutoFillDownloadManager(Profile* profile)
: profile_(profile),
observer_(NULL),
@@ -42,6 +48,10 @@ AutoFillDownloadManager::AutoFillDownloadManager(Profile* profile)
fetcher_id_for_unittest_(0),
is_testing_(false) {
// |profile_| could be NULL in some unit-tests.
+#ifdef ANDROID
+ positive_upload_rate_ = kAutoFillPositiveUploadRateDefaultValue;
+ negative_upload_rate_ = kAutoFillNegativeUploadRateDefaultValue;
+#else
if (profile_) {
PrefService* preferences = profile_->GetPrefs();
positive_upload_rate_ =
@@ -49,6 +59,7 @@ AutoFillDownloadManager::AutoFillDownloadManager(Profile* profile)
negative_upload_rate_ =
preferences->GetReal(prefs::kAutoFillNegativeUploadRate);
}
+#endif
}
AutoFillDownloadManager::~AutoFillDownloadManager() {