diff options
author | Ben Murdoch <benm@google.com> | 2011-07-19 16:53:23 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-07-21 18:18:52 +0100 |
commit | bb958596648e7394f6cd9dcbd264ef9931655764 (patch) | |
tree | fb831f85088bd18727a650cdeda594b29ffc6be9 /chrome/browser/autofill/autofill_download.cc | |
parent | 74b084c38a376b8c8ee24cadcc3e65bfb4b47160 (diff) | |
download | external_chromium-bb958596648e7394f6cd9dcbd264ef9931655764.zip external_chromium-bb958596648e7394f6cd9dcbd264ef9931655764.tar.gz external_chromium-bb958596648e7394f6cd9dcbd264ef9931655764.tar.bz2 |
Query the platform for the Autofill server URL.
The URL to use to make autofill requests is now configured by the
platform. Add a JNI call to retrieve it.
See also frameworks/base change I0aa85c5bef834b1120baaabdc2dd2e4e607a63b6
Bug: 4515820
Change-Id: I3a22ae42402f52207eee2d0d9df64700cb7c9f45
Diffstat (limited to 'chrome/browser/autofill/autofill_download.cc')
-rw-r--r-- | chrome/browser/autofill/autofill_download.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/autofill/autofill_download.cc b/chrome/browser/autofill/autofill_download.cc index 6130b04..295aef0 100644 --- a/chrome/browser/autofill/autofill_download.cc +++ b/chrome/browser/autofill/autofill_download.cc @@ -8,6 +8,9 @@ #include <ostream> #include <vector> +#ifdef ANDROID +#include "android/jni/autofill_request_url.h" +#endif #include "base/logging.h" #include "base/rand_util.h" #include "base/stl_util-inl.h" @@ -214,6 +217,17 @@ bool AutofillDownloadManager::StartRequest( else request_url = AUTO_FILL_UPLOAD_SERVER_REQUEST_URL; +#ifdef ANDROID + if (request_data.request_type == AutofillDownloadManager::REQUEST_QUERY) { + // Ask the platform what URL to use for Autofill. If the + // platform doesn't know, bail and rely on the heuristics + // we've gathered. + request_url = android::AutofillRequestUrl::GetQueryUrl(); + if (request_url.empty()) + return false; + } +#endif + // Id is ignored for regular chrome, in unit test id's for fake fetcher // factory will be 0, 1, 2, ... URLFetcher *fetcher = URLFetcher::Create(fetcher_id_for_unittest_++, |