diff options
author | Selim Gurun <sgurun@google.com> | 2013-04-04 11:00:46 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-04-04 11:00:46 -0700 |
commit | 679c8f689f6799d143719bb8eb839e2640bf9d07 (patch) | |
tree | fc44ee2fdf63bbf598a02361bb7cebd8589eb3cc | |
parent | 8225df007e44966335115939e374f676aa8e6e4b (diff) | |
parent | 38915fd4d466cc233189bf5b5c11d7f03a416d35 (diff) | |
download | frameworks_base-679c8f689f6799d143719bb8eb839e2640bf9d07.zip frameworks_base-679c8f689f6799d143719bb8eb839e2640bf9d07.tar.gz frameworks_base-679c8f689f6799d143719bb8eb839e2640bf9d07.tar.bz2 |
am 38915fd4: Revert "Add a delimiter between scheme and host"
* commit '38915fd4d466cc233189bf5b5c11d7f03a416d35':
Revert "Add a delimiter between scheme and host"
-rw-r--r-- | core/java/android/webkit/BrowserFrame.java | 15 | ||||
-rw-r--r-- | core/java/android/webkit/WebView.java | 3 | ||||
-rw-r--r-- | core/java/android/webkit/WebViewDatabaseClassic.java | 15 |
3 files changed, 7 insertions, 26 deletions
diff --git a/core/java/android/webkit/BrowserFrame.java b/core/java/android/webkit/BrowserFrame.java index 66c2727..9e454a7 100644 --- a/core/java/android/webkit/BrowserFrame.java +++ b/core/java/android/webkit/BrowserFrame.java @@ -70,7 +70,6 @@ class BrowserFrame extends Handler { * request's LoadListener */ private final static int MAX_OUTSTANDING_REQUESTS = 300; - private final static String SCHEME_HOST_DELIMITER = "://"; private final CallbackProxy mCallbackProxy; private final WebSettingsClassic mSettings; @@ -505,14 +504,10 @@ class BrowserFrame extends Handler { .getCurrentItem(); if (item != null) { WebAddress uri = new WebAddress(item.getUrl()); - String schemePlusHost = uri.getScheme() + SCHEME_HOST_DELIMITER + - uri.getHost(); - String[] up = mDatabase.getUsernamePassword( - schemePlusHost); - if (up == null) { // no row found, try again using the legacy method - schemePlusHost = uri.getScheme() + uri.getHost(); - up = mDatabase.getUsernamePassword(schemePlusHost); - } + String schemePlusHost = uri.getScheme() + uri.getHost(); + String[] up = + WebViewDatabaseClassic.getInstance(mContext) + .getUsernamePassword(schemePlusHost); if (up != null && up[0] != null) { setUsernamePassword(up[0], up[1]); } @@ -825,7 +820,7 @@ class BrowserFrame extends Handler { } WebAddress uri = new WebAddress(mCallbackProxy .getBackForwardList().getCurrentItem().getUrl()); - String schemePlusHost = uri.getScheme() + SCHEME_HOST_DELIMITER + uri.getHost(); + String schemePlusHost = uri.getScheme() + uri.getHost(); // Check to see if the username & password appear in // the post data (there could be another form on the // page and that was posted instead. diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 11062a2..e493653 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -588,8 +588,7 @@ public class WebView extends AbsoluteLayout * Saves the username and password for a particular host in this WebView's * internal database. * - * @param host the host that required the credentials. It is recommended that - * the host is given using scheme://hostname format. + * @param host the host that required the credentials * @param username the username for the given host * @param password the password for the given host */ diff --git a/core/java/android/webkit/WebViewDatabaseClassic.java b/core/java/android/webkit/WebViewDatabaseClassic.java index 1e2c199..9b1d4cb 100644 --- a/core/java/android/webkit/WebViewDatabaseClassic.java +++ b/core/java/android/webkit/WebViewDatabaseClassic.java @@ -37,7 +37,7 @@ final class WebViewDatabaseClassic extends WebViewDatabase { private static final String DATABASE_FILE = "webview.db"; private static final String CACHE_DATABASE_FILE = "webviewCache.db"; - private static final int DATABASE_VERSION = 12; + private static final int DATABASE_VERSION = 11; // 2 -> 3 Modified Cache table to allow cache of redirects // 3 -> 4 Added Oma-Downloads table // 4 -> 5 Modified Cache table to support persistent contentLength @@ -50,7 +50,6 @@ final class WebViewDatabaseClassic extends WebViewDatabase { // 10 -> 11 Drop cookies and cache now managed by the chromium stack, // and update the form data table to use the new format // implemented for b/5265606. - // 11 -> 12 Add a delimiter between scheme and host when storing passwords private static WebViewDatabaseClassic sInstance = null; @@ -166,23 +165,11 @@ final class WebViewDatabaseClassic extends WebViewDatabase { private static void upgradeDatabase() { upgradeDatabaseToV10(); upgradeDatabaseFromV10ToV11(); - upgradeDatabaseFromV11ToV12(); // Add future database upgrade functions here, one version at a // time. sDatabase.setVersion(DATABASE_VERSION); } - private static void upgradeDatabaseFromV11ToV12() { - int oldVersion = sDatabase.getVersion(); - - if (oldVersion >= 12) { - // Nothing to do. - return; - } - // delete the rows in the database. - sDatabase.delete(mTableNames[TABLE_PASSWORD_ID], null, null); - } - private static void upgradeDatabaseFromV10ToV11() { int oldVersion = sDatabase.getVersion(); |