De-classicify Android Browser part 2

Bug: 10427705

Allows Browser to compile even when WebViewClassic is no longer in
frameworks/base. The deleted functionality was already disabled at
runtime when using non-classic webview.

Change-Id: I21b58ec52ac059c699b49a2dd80008d9a9e6791a
diff --git a/res/menu/browser.xml b/res/menu/browser.xml
index 9d95e88..27c0c81 100644
--- a/res/menu/browser.xml
+++ b/res/menu/browser.xml
@@ -63,9 +63,6 @@
                 android:id="@+id/ua_desktop_menu_id"
                 android:checkable="true"
                 android:title="@string/ua_switcher_desktop" />
-            <item
-                android:id="@+id/save_snapshot_menu_id"
-                android:title="@string/menu_save_snapshot" />
         </group>
         <group
             android:id="@+id/SNAPSHOT_MENU">
diff --git a/res/xml/general_preferences.xml b/res/xml/general_preferences.xml
index 6f42d3d..d2b9c51 100644
--- a/res/xml/general_preferences.xml
+++ b/res/xml/general_preferences.xml
@@ -29,11 +29,6 @@
             android:defaultValue="true"
         />
 
-        <PreferenceScreen
-            android:fragment="com.android.browser.AutoFillSettingsFragment"
-            android:key="autofill_profile"
-            android:title="@string/pref_autofill_profile_editor"
-            android:summary="@string/pref_autofill_profile_editor_summary" />
     </PreferenceCategory>
 
 </PreferenceScreen>
diff --git a/src/com/android/browser/AutoFillProfileDatabase.java b/src/com/android/browser/AutoFillProfileDatabase.java
index 9666926..3bd9dac 100644
--- a/src/com/android/browser/AutoFillProfileDatabase.java
+++ b/src/com/android/browser/AutoFillProfileDatabase.java
@@ -22,7 +22,6 @@
 import android.database.sqlite.SQLiteOpenHelper;
 import android.provider.BaseColumns;
 import android.util.Log;
-import android.webkit.WebSettingsClassic.AutoFillProfile;
 
 public class AutoFillProfileDatabase {
 
@@ -95,34 +94,6 @@
         return writable ? mOpenHelper.getWritableDatabase() : mOpenHelper.getReadableDatabase();
     }
 
-    public void addOrUpdateProfile(final int id, AutoFillProfile profile) {
-        final String sql = "INSERT OR REPLACE INTO " + PROFILES_TABLE_NAME + " ("
-                + Profiles._ID + ","
-                + Profiles.FULL_NAME + ","
-                + Profiles.EMAIL_ADDRESS + ","
-                + Profiles.COMPANY_NAME + ","
-                + Profiles.ADDRESS_LINE_1 + ","
-                + Profiles.ADDRESS_LINE_2 + ","
-                + Profiles.CITY + ","
-                + Profiles.STATE + ","
-                + Profiles.ZIP_CODE + ","
-                + Profiles.COUNTRY + ","
-                + Profiles.PHONE_NUMBER
-                + ") VALUES (?,?,?,?,?,?,?,?,?,?,?);";
-        final Object[] params = { id,
-                profile.getFullName(),
-                profile.getEmailAddress(),
-                profile.getCompanyName(),
-                profile.getAddressLine1(),
-                profile.getAddressLine2(),
-                profile.getCity(),
-                profile.getState(),
-                profile.getZipCode(),
-                profile.getCountry(),
-                profile.getPhoneNumber() };
-        getDatabase(true).execSQL(sql, params);
-    }
-
     public Cursor getProfile(int id) {
         final String[] cols = {
                 Profiles.FULL_NAME,
diff --git a/src/com/android/browser/AutoFillSettingsFragment.java b/src/com/android/browser/AutoFillSettingsFragment.java
deleted file mode 100644
index 68b325e..0000000
--- a/src/com/android/browser/AutoFillSettingsFragment.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.browser;
-
-import android.app.Fragment;
-import android.content.Context;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.text.Editable;
-import android.text.TextWatcher;
-import android.util.Log;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.View.OnClickListener;
-import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
-import android.view.inputmethod.InputMethodManager;
-import android.webkit.WebSettingsClassic.AutoFillProfile;
-import android.widget.Button;
-import android.widget.EditText;
-import android.widget.Toast;
-
-public class AutoFillSettingsFragment extends Fragment {
-
-    private static final String LOGTAG = "AutoFillSettingsFragment";
-
-    private EditText mFullNameEdit;
-    private EditText mEmailEdit;
-    private EditText mCompanyEdit;
-    private EditText mAddressLine1Edit;
-    private EditText mAddressLine2Edit;
-    private EditText mCityEdit;
-    private EditText mStateEdit;
-    private EditText mZipEdit;
-    private EditText mCountryEdit;
-    private EditText mPhoneEdit;
-
-    private MenuItem mSaveMenuItem;
-
-    private boolean mInitialised;
-
-    // Used to display toast after DB interactions complete.
-    private Handler mHandler;
-    private BrowserSettings mSettings;
-
-    private final static int PROFILE_SAVED_MSG = 100;
-    private final static int PROFILE_DELETED_MSG = 101;
-
-    // For now we support just one profile so it's safe to hardcode the
-    // id to 1 here. In the future this unique identifier will be set
-    // dynamically.
-    private int mUniqueId = 1;
-
-    private class PhoneNumberValidator implements TextWatcher {
-        // Keep in sync with kPhoneNumberLength in chrome/browser/autofill/phone_number.cc
-        private static final int PHONE_NUMBER_LENGTH = 7;
-        private static final String PHONE_NUMBER_SEPARATORS_REGEX = "[\\s\\.\\(\\)-]";
-
-        public void afterTextChanged(Editable s) {
-            String phoneNumber = s.toString();
-            int phoneNumberLength = phoneNumber.length();
-
-            // Strip out any phone number separators.
-            phoneNumber = phoneNumber.replaceAll(PHONE_NUMBER_SEPARATORS_REGEX, "");
-
-            int strippedPhoneNumberLength = phoneNumber.length();
-
-            if (phoneNumberLength > 0 && strippedPhoneNumberLength < PHONE_NUMBER_LENGTH) {
-                mPhoneEdit.setError(getResources().getText(
-                        R.string.autofill_profile_editor_phone_number_invalid));
-            } else {
-                mPhoneEdit.setError(null);
-            }
-
-            updateSaveMenuItemState();
-        }
-
-        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-        }
-
-        public void onTextChanged(CharSequence s, int start, int before, int count) {
-        }
-    }
-
-    private class FieldChangedListener implements TextWatcher {
-        public void afterTextChanged(Editable s) {
-            updateSaveMenuItemState();
-        }
-
-        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-        }
-
-        public void onTextChanged(CharSequence s, int start, int before, int count) {
-        }
-
-    }
-
-    private TextWatcher mFieldChangedListener = new FieldChangedListener();
-
-    public AutoFillSettingsFragment() {
-        mHandler = new Handler() {
-            @Override
-            public void handleMessage(Message msg) {
-                Context c = getActivity();
-                switch (msg.what) {
-                case PROFILE_SAVED_MSG:
-                    if (c != null) {
-                        Toast.makeText(c, R.string.autofill_profile_successful_save,
-                                Toast.LENGTH_SHORT).show();
-                        closeEditor();
-                    }
-                    break;
-
-                case PROFILE_DELETED_MSG:
-                    if (c != null) {
-                        Toast.makeText(c, R.string.autofill_profile_successful_delete,
-                                Toast.LENGTH_SHORT).show();
-                    }
-                    break;
-                }
-            }
-        };
-    }
-
-    @Override
-    public void onCreate(Bundle savedState) {
-        super.onCreate(savedState);
-        setHasOptionsMenu(true);
-        mSettings = BrowserSettings.getInstance();
-    }
-
-    @Override
-    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
-        inflater.inflate(R.menu.autofill_profile_editor, menu);
-        mSaveMenuItem = menu.findItem(R.id.autofill_profile_editor_save_profile_menu_id);
-        updateSaveMenuItemState();
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-        case R.id.autofill_profile_editor_delete_profile_menu_id:
-            // Clear the UI.
-            mFullNameEdit.setText("");
-            mEmailEdit.setText("");
-            mCompanyEdit.setText("");
-            mAddressLine1Edit.setText("");
-            mAddressLine2Edit.setText("");
-            mCityEdit.setText("");
-            mStateEdit.setText("");
-            mZipEdit.setText("");
-            mCountryEdit.setText("");
-            mPhoneEdit.setText("");
-
-            // Update browser settings and native with a null profile. This will
-            // trigger the current profile to get deleted from the DB.
-            mSettings.setAutoFillProfile(null,
-                    mHandler.obtainMessage(PROFILE_DELETED_MSG));
-            updateSaveMenuItemState();
-            return true;
-
-        case R.id.autofill_profile_editor_save_profile_menu_id:
-            AutoFillProfile newProfile = new AutoFillProfile(
-                    mUniqueId,
-                    mFullNameEdit.getText().toString(),
-                    mEmailEdit.getText().toString(),
-                    mCompanyEdit.getText().toString(),
-                    mAddressLine1Edit.getText().toString(),
-                    mAddressLine2Edit.getText().toString(),
-                    mCityEdit.getText().toString(),
-                    mStateEdit.getText().toString(),
-                    mZipEdit.getText().toString(),
-                    mCountryEdit.getText().toString(),
-                    mPhoneEdit.getText().toString());
-
-            mSettings.setAutoFillProfile(newProfile,
-                    mHandler.obtainMessage(PROFILE_SAVED_MSG));
-            return true;
-
-        default:
-            return false;
-        }
-    }
-
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container,
-            Bundle savedInstanceState) {
-        View v = inflater.inflate(R.layout.autofill_settings_fragment, container, false);
-
-        mFullNameEdit = (EditText)v.findViewById(R.id.autofill_profile_editor_name_edit);
-        mEmailEdit = (EditText)v.findViewById(R.id.autofill_profile_editor_email_address_edit);
-        mCompanyEdit = (EditText)v.findViewById(R.id.autofill_profile_editor_company_name_edit);
-        mAddressLine1Edit = (EditText)v.findViewById(
-                R.id.autofill_profile_editor_address_line_1_edit);
-        mAddressLine2Edit = (EditText)v.findViewById(
-                R.id.autofill_profile_editor_address_line_2_edit);
-        mCityEdit = (EditText)v.findViewById(R.id.autofill_profile_editor_city_edit);
-        mStateEdit = (EditText)v.findViewById(R.id.autofill_profile_editor_state_edit);
-        mZipEdit = (EditText)v.findViewById(R.id.autofill_profile_editor_zip_code_edit);
-        mCountryEdit = (EditText)v.findViewById(R.id.autofill_profile_editor_country_edit);
-        mPhoneEdit = (EditText)v.findViewById(R.id.autofill_profile_editor_phone_number_edit);
-
-        mFullNameEdit.addTextChangedListener(mFieldChangedListener);
-        mEmailEdit.addTextChangedListener(mFieldChangedListener);
-        mCompanyEdit.addTextChangedListener(mFieldChangedListener);
-        mAddressLine1Edit.addTextChangedListener(mFieldChangedListener);
-        mAddressLine2Edit.addTextChangedListener(mFieldChangedListener);
-        mCityEdit.addTextChangedListener(mFieldChangedListener);
-        mStateEdit.addTextChangedListener(mFieldChangedListener);
-        mZipEdit.addTextChangedListener(mFieldChangedListener);
-        mCountryEdit.addTextChangedListener(mFieldChangedListener);
-        mPhoneEdit.addTextChangedListener(new PhoneNumberValidator());
-
-        // Populate the text boxes with any pre existing AutoFill data.
-        AutoFillProfile activeProfile = mSettings.getAutoFillProfile();
-        if (activeProfile != null) {
-            mFullNameEdit.setText(activeProfile.getFullName());
-            mEmailEdit.setText(activeProfile.getEmailAddress());
-            mCompanyEdit.setText(activeProfile.getCompanyName());
-            mAddressLine1Edit.setText(activeProfile.getAddressLine1());
-            mAddressLine2Edit.setText(activeProfile.getAddressLine2());
-            mCityEdit.setText(activeProfile.getCity());
-            mStateEdit.setText(activeProfile.getState());
-            mZipEdit.setText(activeProfile.getZipCode());
-            mCountryEdit.setText(activeProfile.getCountry());
-            mPhoneEdit.setText(activeProfile.getPhoneNumber());
-        }
-
-        mInitialised = true;
-
-        updateSaveMenuItemState();
-
-        return v;
-    }
-
-    private void updateSaveMenuItemState() {
-        if (mSaveMenuItem == null) {
-            return;
-        }
-
-        if (!mInitialised) {
-            mSaveMenuItem.setEnabled(false);
-            return;
-        }
-
-        boolean currentState = mSaveMenuItem.isEnabled();
-        boolean newState = (mFullNameEdit.getText().toString().length() > 0 ||
-            mEmailEdit.getText().toString().length() > 0 ||
-            mCompanyEdit.getText().toString().length() > 0 ||
-            mAddressLine1Edit.getText().toString().length() > 0 ||
-            mAddressLine2Edit.getText().toString().length() > 0 ||
-            mCityEdit.getText().toString().length() > 0 ||
-            mStateEdit.getText().toString().length() > 0 ||
-            mZipEdit.getText().toString().length() > 0 ||
-            mCountryEdit.getText().toString().length() > 0) &&
-            mPhoneEdit.getError() == null;
-
-        if (currentState != newState) {
-            mSaveMenuItem.setEnabled(newState);
-        }
-    }
-
-    private void closeEditor() {
-        // Hide the IME if the user wants to close while an EditText has focus
-        InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(
-                Context.INPUT_METHOD_SERVICE);
-        imm.hideSoftInputFromWindow(getView().getWindowToken(), 0);
-        if (getFragmentManager().getBackStackEntryCount() > 0) {
-            getFragmentManager().popBackStack();
-        } else {
-            getActivity().finish();
-        }
-    }
-}
diff --git a/src/com/android/browser/AutofillHandler.java b/src/com/android/browser/AutofillHandler.java
deleted file mode 100644
index 5b0320d..0000000
--- a/src/com/android/browser/AutofillHandler.java
+++ /dev/null
@@ -1,283 +0,0 @@
-
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.browser;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.content.SharedPreferences.Editor;
-import android.database.Cursor;
-import android.net.Uri;
-import android.os.AsyncTask;
-import android.os.Message;
-import android.preference.PreferenceManager;
-import android.provider.ContactsContract;
-import android.util.Log;
-import android.webkit.WebSettingsClassic.AutoFillProfile;
-
-import java.util.concurrent.CountDownLatch;
-
-public class AutofillHandler {
-
-    private AutoFillProfile mAutoFillProfile;
-    // Default to zero. In the case no profile is set up, the initial
-    // value will come from the AutoFillSettingsFragment when the user
-    // creates a profile. Otherwise, we'll read the ID of the last used
-    // profile from the prefs db.
-    private int mAutoFillActiveProfileId;
-    private static final int NO_AUTOFILL_PROFILE_SET = 0;
-
-    private CountDownLatch mLoaded = new CountDownLatch(1);
-    private Context mContext;
-
-    private static final String LOGTAG = "AutofillHandler";
-
-    public AutofillHandler(Context context) {
-        mContext = context.getApplicationContext();
-    }
-
-    /**
-     * Load settings from the browser app's database. It is performed in
-     * an AsyncTask as it involves plenty of slow disk IO.
-     * NOTE: Strings used for the preferences must match those specified
-     * in the various preference XML files.
-     */
-    public void asyncLoadFromDb() {
-        // Run the initial settings load in an AsyncTask as it hits the
-        // disk multiple times through SharedPreferences and SQLite. We
-        // need to be certain though that this has completed before we start
-        // to load pages though, so in the worst case we will block waiting
-        // for it to finish in BrowserActivity.onCreate().
-         new LoadFromDb().start();
-    }
-
-    private void waitForLoad() {
-        try {
-            mLoaded.await();
-        } catch (InterruptedException e) {
-            Log.w(LOGTAG, "Caught exception while waiting for AutofillProfile to load.");
-        }
-    }
-
-    private class LoadFromDb extends Thread {
-
-        @Override
-        public void run() {
-            // Note the lack of synchronization over mAutoFillActiveProfileId and
-            // mAutoFillProfile here. This is because we control all other access
-            // to these members through the public functions of this class, and they
-            // all wait for this thread via the mLoaded CountDownLatch.
-
-            SharedPreferences p = PreferenceManager.getDefaultSharedPreferences(mContext);
-
-            // Read the last active AutoFill profile id.
-            mAutoFillActiveProfileId = p.getInt(
-                    PreferenceKeys.PREF_AUTOFILL_ACTIVE_PROFILE_ID,
-                    mAutoFillActiveProfileId);
-
-            // Load the autofill profile data from the database. We use a database separate
-            // to the browser preference DB to make it easier to support multiple profiles
-            // and switching between them. Note that this may block startup if this DB lookup
-            // is extremely slow. We do this to ensure that if there's a profile set, the
-            // user never sees the "setup Autofill" option.
-            AutoFillProfileDatabase autoFillDb = AutoFillProfileDatabase.getInstance(mContext);
-            Cursor c = autoFillDb.getProfile(mAutoFillActiveProfileId);
-
-            if (c.getCount() > 0) {
-                c.moveToFirst();
-
-                String fullName = c.getString(c.getColumnIndex(
-                        AutoFillProfileDatabase.Profiles.FULL_NAME));
-                String email = c.getString(c.getColumnIndex(
-                        AutoFillProfileDatabase.Profiles.EMAIL_ADDRESS));
-                String company = c.getString(c.getColumnIndex(
-                        AutoFillProfileDatabase.Profiles.COMPANY_NAME));
-                String addressLine1 = c.getString(c.getColumnIndex(
-                        AutoFillProfileDatabase.Profiles.ADDRESS_LINE_1));
-                String addressLine2 = c.getString(c.getColumnIndex(
-                        AutoFillProfileDatabase.Profiles.ADDRESS_LINE_2));
-                String city = c.getString(c.getColumnIndex(
-                        AutoFillProfileDatabase.Profiles.CITY));
-                String state = c.getString(c.getColumnIndex(
-                        AutoFillProfileDatabase.Profiles.STATE));
-                String zip = c.getString(c.getColumnIndex(
-                        AutoFillProfileDatabase.Profiles.ZIP_CODE));
-                String country = c.getString(c.getColumnIndex(
-                        AutoFillProfileDatabase.Profiles.COUNTRY));
-                String phone = c.getString(c.getColumnIndex(
-                        AutoFillProfileDatabase.Profiles.PHONE_NUMBER));
-                mAutoFillProfile = new AutoFillProfile(mAutoFillActiveProfileId,
-                        fullName, email, company, addressLine1, addressLine2, city,
-                        state, zip, country, phone);
-            }
-            c.close();
-            autoFillDb.close();
-
-            // At this point we've loaded the profile if there was one, so let any thread
-            // waiting on initialization continue.
-            mLoaded.countDown();
-
-            // Synchronization note: strictly speaking, it's possible that mAutoFillProfile
-            // may get a value after we check below, but that's OK. This check is only an
-            // optimisation, and we do a proper synchronized check further down when it comes
-            // to actually setting the inferred profile.
-            if (mAutoFillProfile == null) {
-                // We did not load a profile from disk. Try to infer one from the user's
-                // "me" contact.
-                final Uri profileUri = Uri.withAppendedPath(ContactsContract.Profile.CONTENT_URI,
-                        ContactsContract.Contacts.Data.CONTENT_DIRECTORY);
-                String name = getContactField(profileUri,
-                        ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME,
-                        ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE);
-                // Only attempt to read other data and set a profile if we could successfully
-                // get a name.
-                if (name != null) {
-                    String email = getContactField(profileUri,
-                            ContactsContract.CommonDataKinds.Email.ADDRESS,
-                            ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE);
-                    String phone = getContactField(profileUri,
-                            ContactsContract.CommonDataKinds.Phone.NUMBER,
-                            ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE);
-                    String company = getContactField(profileUri,
-                            ContactsContract.CommonDataKinds.Organization.COMPANY,
-                            ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE);
-
-                    // Can't easily get structured postal address information (even using
-                    // CommonDataKinds.StructuredPostal) so omit prepopulating that for now.
-                    // When querying structured postal data, it often all comes back as a string
-                    // inside the "street" field.
-
-                    synchronized(AutofillHandler.this) {
-                        // Only use this profile if one hasn't been set inbetween the
-                        // inital import and this thread getting to this point.
-                        if (mAutoFillProfile == null) {
-                            setAutoFillProfile(new AutoFillProfile(1, name, email, company,
-                                    null, null, null, null, null, null, phone), null);
-                        }
-                    }
-                }
-            }
-        }
-
-        private String getContactField(Uri uri, String field, String itemType) {
-            String result = null;
-
-            Cursor c = mContext.getContentResolver().query(uri, new String[] { field },
-                    ContactsContract.Data.MIMETYPE + "=?", new String[] { itemType }, null);
-
-            if (c == null) {
-                return null;
-            }
-
-            try {
-                // Just use the first returned value if we get more than one.
-                if (c.moveToFirst()) {
-                    result = c.getString(0);
-                }
-            } finally {
-                c.close();
-            }
-            return result;
-        }
-    }
-
-    public synchronized void setAutoFillProfile(AutoFillProfile profile, Message msg) {
-        waitForLoad();
-        int profileId = NO_AUTOFILL_PROFILE_SET;
-        if (profile != null) {
-            profileId = profile.getUniqueId();
-            // Update the AutoFill DB with the new profile.
-            new SaveProfileToDbTask(msg).execute(profile);
-        } else {
-            // Delete the current profile.
-            if (mAutoFillProfile != null) {
-                new DeleteProfileFromDbTask(msg).execute(mAutoFillProfile.getUniqueId());
-            }
-        }
-        // Make sure we set mAutoFillProfile before calling setActiveAutoFillProfileId
-        // Calling setActiveAutoFillProfileId will trigger an update of WebViews
-        // which will expect a new profile to be set
-        mAutoFillProfile = profile;
-        setActiveAutoFillProfileId(profileId);
-    }
-
-    public synchronized AutoFillProfile getAutoFillProfile() {
-        waitForLoad();
-        return mAutoFillProfile;
-    }
-
-    private synchronized void setActiveAutoFillProfileId(int activeProfileId) {
-        mAutoFillActiveProfileId = activeProfileId;
-        Editor ed = PreferenceManager.
-            getDefaultSharedPreferences(mContext).edit();
-        ed.putInt(PreferenceKeys.PREF_AUTOFILL_ACTIVE_PROFILE_ID, activeProfileId);
-        ed.apply();
-    }
-
-    private abstract class AutoFillProfileDbTask<T> extends AsyncTask<T, Void, Void> {
-        AutoFillProfileDatabase mAutoFillProfileDb;
-        Message mCompleteMessage;
-
-        public AutoFillProfileDbTask(Message msg) {
-            mCompleteMessage = msg;
-        }
-
-        @Override
-        protected void onPostExecute(Void result) {
-            if (mCompleteMessage != null) {
-                mCompleteMessage.sendToTarget();
-            }
-            mAutoFillProfileDb.close();
-        }
-
-        @Override
-        abstract protected Void doInBackground(T... values);
-    }
-
-
-    private class SaveProfileToDbTask extends AutoFillProfileDbTask<AutoFillProfile> {
-        public SaveProfileToDbTask(Message msg) {
-            super(msg);
-        }
-
-        @Override
-        protected Void doInBackground(AutoFillProfile... values) {
-            mAutoFillProfileDb = AutoFillProfileDatabase.getInstance(mContext);
-            synchronized (AutofillHandler.this) {
-                assert mAutoFillActiveProfileId != NO_AUTOFILL_PROFILE_SET;
-                AutoFillProfile newProfile = values[0];
-                mAutoFillProfileDb.addOrUpdateProfile(mAutoFillActiveProfileId, newProfile);
-            }
-            return null;
-        }
-    }
-
-    private class DeleteProfileFromDbTask extends AutoFillProfileDbTask<Integer> {
-        public DeleteProfileFromDbTask(Message msg) {
-            super(msg);
-        }
-
-        @Override
-        protected Void doInBackground(Integer... values) {
-            mAutoFillProfileDb = AutoFillProfileDatabase.getInstance(mContext);
-            int id = values[0];
-            assert  id > 0;
-            mAutoFillProfileDb.dropProfile(id);
-            return null;
-        }
-    }
-}
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 3ba3182..6b10459 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -46,7 +46,6 @@
 import android.view.inputmethod.InputMethodManager;
 import android.webkit.WebChromeClient;
 import android.webkit.WebView;
-import android.webkit.WebViewClassic;
 import android.widget.FrameLayout;
 import android.widget.ImageButton;
 import android.widget.LinearLayout;
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index 95afa71..ed44394 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -38,8 +38,6 @@
 import android.webkit.WebSettings.PluginState;
 import android.webkit.WebSettings.TextSize;
 import android.webkit.WebSettings.ZoomDensity;
-import android.webkit.WebSettingsClassic;
-import android.webkit.WebSettingsClassic.AutoFillProfile;
 import android.webkit.WebStorage;
 import android.webkit.WebView;
 import android.webkit.WebViewDatabase;
@@ -111,7 +109,6 @@
     private LinkedList<WeakReference<WebSettings>> mManagedSettings;
     private Controller mController;
     private WebStorageSizeManager mWebStorageSizeManager;
-    private AutofillHandler mAutofillHandler;
     private WeakHashMap<WebSettings, String> mCustomUserAgents;
     private static boolean sInitialized = false;
     private boolean mNeedsSharedSync = true;
@@ -140,10 +137,8 @@
     private BrowserSettings(Context context) {
         mContext = context.getApplicationContext();
         mPrefs = PreferenceManager.getDefaultSharedPreferences(mContext);
-        mAutofillHandler = new AutofillHandler(mContext);
         mManagedSettings = new LinkedList<WeakReference<WebSettings>>();
         mCustomUserAgents = new WeakHashMap<WebSettings, String>();
-        mAutofillHandler.asyncLoadFromDb();
         BackgroundHandler.execute(mSetup);
     }
 
@@ -277,31 +272,6 @@
         } else {
             settings.setUserAgentString(USER_AGENTS[getUserAgent()]);
         }
-
-        if (!(settings instanceof WebSettingsClassic)) return;
-
-        WebSettingsClassic settingsClassic = (WebSettingsClassic) settings;
-        settingsClassic.setHardwareAccelSkiaEnabled(isSkiaHardwareAccelerated());
-        settingsClassic.setShowVisualIndicator(enableVisualIndicator());
-        settingsClassic.setForceUserScalable(forceEnableUserScalable());
-        settingsClassic.setDoubleTapZoom(getDoubleTapZoom());
-        settingsClassic.setAutoFillEnabled(isAutofillEnabled());
-        settingsClassic.setAutoFillProfile(getAutoFillProfile());
-
-        boolean useInverted = useInvertedRendering();
-        settingsClassic.setProperty(WebViewProperties.gfxInvertedScreen,
-                useInverted ? "true" : "false");
-        if (useInverted) {
-          settingsClassic.setProperty(WebViewProperties.gfxInvertedScreenContrast,
-                    Float.toString(getInvertedContrast()));
-        }
-
-        if (isDebugEnabled()) {
-          settingsClassic.setProperty(WebViewProperties.gfxEnableCpuUploadPath,
-                    enableCpuUploadPath() ? "true" : "false");
-        }
-
-        settingsClassic.setLinkPrefetchEnabled(mLinkPrefetchAllowed);
     }
 
     /**
@@ -335,19 +305,6 @@
         // origin policy for file access
         settings.setAllowUniversalAccessFromFileURLs(false);
         settings.setAllowFileAccessFromFileURLs(false);
-
-        if (!(settings instanceof WebSettingsClassic)) return;
-
-        WebSettingsClassic settingsClassic = (WebSettingsClassic) settings;
-        settingsClassic.setPageCacheCapacity(getPageCacheCapacity());
-        // WebView should be preserving the memory as much as possible.
-        // However, apps like browser wish to turn on the performance mode which
-        // would require more memory.
-        // TODO: We need to dynamically allocate/deallocate temporary memory for
-        // apps which are trying to use minimal memory. Currently, double
-        // buffering is always turned on, which is unnecessary.
-        settingsClassic.setProperty(WebViewProperties.gfxUseMinimalMemory, "false");
-        settingsClassic.setWorkersEnabled(true);  // This only affects V8.
     }
 
     private void syncSharedSettings() {
@@ -523,19 +480,6 @@
         updateSearchEngine(false);
     }
 
-    public AutoFillProfile getAutoFillProfile() {
-        return mAutofillHandler.getAutoFillProfile();
-    }
-
-    public void setAutoFillProfile(AutoFillProfile profile, Message msg) {
-        mAutofillHandler.setAutoFillProfile(profile, msg);
-        // Auto-fill will reuse the same profile ID when making edits to the profile,
-        // so we need to force a settings sync (otherwise the SharedPreferences
-        // manager will optimise out the call to onSharedPreferenceChanged(), as
-        // it thinks nothing has changed).
-        syncManagedSettings();
-    }
-
     public void toggleDebugSettings() {
         setDebugEnabled(!isDebugEnabled());
     }
diff --git a/src/com/android/browser/BrowserWebView.java b/src/com/android/browser/BrowserWebView.java
index 99e0587..3e3672c 100644
--- a/src/com/android/browser/BrowserWebView.java
+++ b/src/com/android/browser/BrowserWebView.java
@@ -22,9 +22,7 @@
 import android.view.View;
 import android.webkit.WebChromeClient;
 import android.webkit.WebStorage;
-import android.webkit.WebStorageClassic;
 import android.webkit.WebView;
-import android.webkit.WebViewClassic;
 import android.webkit.WebViewClient;
 
 import java.util.Map;
@@ -32,7 +30,7 @@
 /**
  * Manage WebView scroll events
  */
-public class BrowserWebView extends WebView implements WebViewClassic.TitleBarDelegate {
+public class BrowserWebView extends WebView {
 
     public interface OnScrollChangedListener {
         void onScrollChanged(int l, int t, int oldl, int oldt);
@@ -80,11 +78,6 @@
         super(context);
     }
 
-    public static boolean isClassic() {
-        // Using WebStorage for convenience of access in a static method.
-        return WebStorage.getInstance() instanceof WebStorageClassic;
-    }
-
     @Override
     public void setWebChromeClient(WebChromeClient client) {
         mWebChromeClient = client;
@@ -109,18 +102,10 @@
         mTitleBar = title;
     }
 
-    // From TitleBarDelegate
-    @Override
     public int getTitleHeight() {
         return (mTitleBar != null) ? mTitleBar.getEmbeddedHeight() : 0;
     }
 
-    // From TitleBarDelegate
-    @Override
-    public void onSetEmbeddedTitleBar(final View title) {
-        // TODO: Remove this method; it is never invoked.
-    }
-
     public boolean hasTitleBar() {
         return (mTitleBar != null);
     }
diff --git a/src/com/android/browser/ComboViewActivity.java b/src/com/android/browser/ComboViewActivity.java
index 91d574e..7053c9b 100644
--- a/src/com/android/browser/ComboViewActivity.java
+++ b/src/com/android/browser/ComboViewActivity.java
@@ -71,14 +71,6 @@
         mTabsAdapter = new TabsAdapter(this, mViewPager);
         mTabsAdapter.addTab(bar.newTab().setText(R.string.tab_bookmarks),
                 BrowserBookmarksPage.class, args);
-        if (BrowserWebView.isClassic()) {
-            // TODO: history page should be able to work in Classic mode, but there's some
-            // provider name conflict. (Snapshot would never work in that mode though).
-            mTabsAdapter.addTab(bar.newTab().setText(R.string.tab_history),
-                    BrowserHistoryPage.class, args);
-            mTabsAdapter.addTab(bar.newTab().setText(R.string.tab_snapshots),
-                    BrowserSnapshotPage.class, args);
-        }
 
         if (savedInstanceState != null) {
             bar.setSelectedNavigationItem(
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 7b7fcd4..2d716a8 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -78,7 +78,6 @@
 import android.webkit.WebIconDatabase;
 import android.webkit.WebSettings;
 import android.webkit.WebView;
-import android.webkit.WebViewClassic;
 import android.widget.Toast;
 
 import com.android.browser.IntentHandler.UrlData;
@@ -131,7 +130,6 @@
     final static int COMBO_VIEW = 1;
     final static int PREFERENCES_PAGE = 3;
     final static int FILE_SELECTED = 4;
-    final static int AUTOFILL_SETUP = 5;
     final static int VOICE_RESULT = 6;
 
     private final static int WAKELOCK_TIMEOUT = 5 * 60 * 1000; // 5 minutes
@@ -260,7 +258,6 @@
 
     @Override
     public void start(final Intent intent) {
-        if (BrowserWebView.isClassic()) WebViewClassic.setShouldMonitorWebCoreThread();
         // mCrashRecoverHandler has any previously saved state.
         mCrashRecoveryHandler.startRecovery(intent);
     }
@@ -356,9 +353,6 @@
         }
         // Read JavaScript flags if it exists.
         String jsFlags = getSettings().getJsEngineFlags();
-        if (jsFlags.trim().length() != 0 && BrowserWebView.isClassic()) {
-            WebViewClassic.fromWebView(getCurrentWebView()).setJsFlags(jsFlags);
-        }
         if (intent != null
                 && BrowserActivity.ACTION_SHOW_BOOKMARKS.equals(intent.getAction())) {
             bookmarksOrHistoryPicker(ComboViews.Bookmarks);
@@ -1166,15 +1160,6 @@
                 if (null == mUploadHandler) break;
                 mUploadHandler.onResult(resultCode, intent);
                 break;
-            case AUTOFILL_SETUP:
-                // Determine whether a profile was actually set up or not
-                // and if so, send the message back to the WebTextView to
-                // fill the form with the new profile.
-                if (getSettings().getAutoFillProfile() != null) {
-                    mAutoFillSetupMessage.sendToTarget();
-                    mAutoFillSetupMessage = null;
-                }
-                break;
             case COMBO_VIEW:
                 if (intent == null || resultCode != Activity.RESULT_OK) {
                     break;
@@ -1196,12 +1181,8 @@
                     long id = intent.getLongExtra(
                             ComboViewActivity.EXTRA_OPEN_SNAPSHOT, -1);
                     if (id >= 0) {
-                        if (BrowserWebView.isClassic()) {
-                            createNewSnapshotTab(id, true);
-                        } else {
-                            Toast.makeText(mActivity, "Snapshot Tab requires WebViewClassic",
-                                Toast.LENGTH_LONG).show();
-                        }
+                        Toast.makeText(mActivity, "Snapshot Tab no longer supported",
+                            Toast.LENGTH_LONG).show();
                     }
                 }
                 break;
@@ -1323,15 +1304,6 @@
         menu.setGroupVisible(R.id.ANCHOR_MENU,
                 type == WebView.HitTestResult.SRC_ANCHOR_TYPE
                 || type == WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE);
-        boolean hitText = type == WebView.HitTestResult.SRC_ANCHOR_TYPE
-                || type == WebView.HitTestResult.PHONE_TYPE
-                || type == WebView.HitTestResult.EMAIL_TYPE
-                || type == WebView.HitTestResult.GEO_TYPE;
-        menu.setGroupVisible(R.id.SELECT_TEXT_MENU, hitText);
-        if (hitText) {
-            menu.findItem(R.id.select_text_menu_id)
-                    .setOnMenuItemClickListener(new SelectText(webview));
-        }
         // Setup custom handling depending on the type
         switch (type) {
             case WebView.HitTestResult.PHONE_TYPE:
@@ -1648,12 +1620,6 @@
                 findOnPage();
                 break;
 
-            case R.id.save_snapshot_menu_id:
-                final Tab source = getTabControl().getCurrentTab();
-                if (source == null) break;
-                new SaveSnapshotTask(source).execute();
-                break;
-
             case R.id.page_info_menu_id:
                 showPageInfo();
                 break;
@@ -1719,69 +1685,6 @@
         return true;
     }
 
-    private class SaveSnapshotTask extends AsyncTask<Void, Void, Long>
-            implements OnCancelListener {
-
-        private Tab mTab;
-        private Dialog mProgressDialog;
-        private ContentValues mValues;
-
-        private SaveSnapshotTask(Tab tab) {
-            mTab = tab;
-        }
-
-        @Override
-        protected void onPreExecute() {
-            CharSequence message = mActivity.getText(R.string.saving_snapshot);
-            mProgressDialog = ProgressDialog.show(mActivity, null, message,
-                    true, true, this);
-            mValues = mTab.createSnapshotValues();
-        }
-
-        @Override
-        protected Long doInBackground(Void... params) {
-            if (!mTab.saveViewState(mValues)) {
-                return null;
-            }
-            if (isCancelled()) {
-                String path = mValues.getAsString(Snapshots.VIEWSTATE_PATH);
-                File file = mActivity.getFileStreamPath(path);
-                if (!file.delete()) {
-                    file.deleteOnExit();
-                }
-                return null;
-            }
-            final ContentResolver cr = mActivity.getContentResolver();
-            Uri result = cr.insert(Snapshots.CONTENT_URI, mValues);
-            if (result == null) {
-                return null;
-            }
-            long id = ContentUris.parseId(result);
-            return id;
-        }
-
-        @Override
-        protected void onPostExecute(Long id) {
-            if (isCancelled()) {
-                return;
-            }
-            mProgressDialog.dismiss();
-            if (id == null) {
-                Toast.makeText(mActivity, R.string.snapshot_failed,
-                        Toast.LENGTH_SHORT).show();
-                return;
-            }
-            Bundle b = new Bundle();
-            b.putLong(BrowserSnapshotPage.EXTRA_ANIMATE_ID, id);
-            mUi.showComboView(ComboViews.Snapshots, b);
-        }
-
-        @Override
-        public void onCancel(DialogInterface dialog) {
-            cancel(true);
-        }
-    }
-
     @Override
     public void toggleUserAgent() {
         WebView web = getCurrentWebView();
@@ -2250,25 +2153,6 @@
         }
     }
 
-    private static class SelectText implements OnMenuItemClickListener {
-        private WebViewClassic mWebView;
-
-        @Override
-        public boolean onMenuItemClick(MenuItem item) {
-            if (mWebView != null) {
-                return mWebView.selectText();
-            }
-            return false;
-        }
-
-        public SelectText(WebView webView) {
-          if (BrowserWebView.isClassic()) {
-              mWebView = WebViewClassic.fromWebView(webView);
-          }
-        }
-
-    }
-
     /********************** TODO: UI stuff *****************************/
 
     // these methods have been copied, they still need to be cleaned up
@@ -2457,21 +2341,6 @@
         return tab;
     }
 
-    @Override
-    public SnapshotTab createNewSnapshotTab(long snapshotId, boolean setActive) {
-        SnapshotTab tab = null;
-        if (mTabControl.canCreateNewTab()) {
-            tab = mTabControl.createSnapshotTab(snapshotId);
-            addTab(tab);
-            if (setActive) {
-                setActiveTab(tab);
-            }
-        } else {
-            mUi.showMaxTabsWarning();
-        }
-        return tab;
-    }
-
     /**
      * @param tab the tab to switch to
      * @return boolean True if we successfully switched to a different tab.  If
@@ -2744,19 +2613,7 @@
                     return true;
                 }
                 break;
-            case KeyEvent.KEYCODE_A:
-                if (ctrl && BrowserWebView.isClassic()) {
-                    WebViewClassic.fromWebView(webView).selectAll();
-                    return true;
-                }
-                break;
 //          case KeyEvent.KEYCODE_B:    // menu
-            case KeyEvent.KEYCODE_C:
-                if (ctrl && BrowserWebView.isClassic()) {
-                    WebViewClassic.fromWebView(webView).copySelection();
-                    return true;
-                }
-                break;
 //          case KeyEvent.KEYCODE_D:    // menu
 //          case KeyEvent.KEYCODE_E:    // in Chrome: puts '?' in URL bar
 //          case KeyEvent.KEYCODE_F:    // menu
@@ -2835,18 +2692,6 @@
     }
 
     @Override
-    public void setupAutoFill(Message message) {
-        // Open the settings activity at the AutoFill profile fragment so that
-        // the user can create a new profile. When they return, we will dispatch
-        // the message so that we can autofill the form using their new profile.
-        Intent intent = new Intent(mActivity, BrowserPreferencesPage.class);
-        intent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT,
-                AutoFillSettingsFragment.class.getName());
-        mAutoFillSetupMessage = message;
-        mActivity.startActivityForResult(intent, AUTOFILL_SETUP);
-    }
-
-    @Override
     public boolean onSearchRequested() {
         mUi.editUrl(false, true);
         return true;
diff --git a/src/com/android/browser/IntentHandler.java b/src/com/android/browser/IntentHandler.java
index 45520d6..684cbba 100644
--- a/src/com/android/browser/IntentHandler.java
+++ b/src/com/android/browser/IntentHandler.java
@@ -172,25 +172,6 @@
                     }
                 }
             } else {
-                if (BrowserWebView.isClassic() && !urlData.isEmpty()
-                        && urlData.mUrl.startsWith("about:debug")) {
-                    if ("about:debug.dom".equals(urlData.mUrl)) {
-                        current.getWebViewClassic().dumpDomTree(false);
-                    } else if ("about:debug.dom.file".equals(urlData.mUrl)) {
-                        current.getWebViewClassic().dumpDomTree(true);
-                    } else if ("about:debug.render".equals(urlData.mUrl)) {
-                        current.getWebViewClassic().dumpRenderTree(false);
-                    } else if ("about:debug.render.file".equals(urlData.mUrl)) {
-                        current.getWebViewClassic().dumpRenderTree(true);
-                    } else if ("about:debug.display".equals(urlData.mUrl)) {
-                        current.getWebViewClassic().dumpDisplayTree();
-                    } else if ("about:debug.nav".equals(urlData.mUrl)) {
-                        current.getWebView().debugDump();
-                    } else {
-                        mSettings.toggleDebugSettings();
-                    }
-                    return;
-                }
                 // Get rid of the subwindow if it exists
                 mController.dismissSubWindow(current);
                 // If the current Tab is being used as an application tab,
diff --git a/src/com/android/browser/KeyChainLookup.java b/src/com/android/browser/KeyChainLookup.java
deleted file mode 100644
index 4d5f694..0000000
--- a/src/com/android/browser/KeyChainLookup.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 201 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.browser;
-
-import android.content.Context;
-import android.os.AsyncTask;
-import android.security.KeyChain;
-import android.security.KeyChainException;
-import android.webkit.ClientCertRequestHandler;
-import java.security.PrivateKey;
-import java.security.cert.X509Certificate;
-
-final class KeyChainLookup extends AsyncTask<Void, Void, Void> {
-    private final Context mContext;
-    private final ClientCertRequestHandler mHandler;
-    private final String mAlias;
-    KeyChainLookup(Context context, ClientCertRequestHandler handler, String alias) {
-        mContext = context.getApplicationContext();
-        mHandler = handler;
-        mAlias = alias;
-    }
-    @Override protected Void doInBackground(Void... params) {
-        PrivateKey privateKey;
-        X509Certificate[] certificateChain;
-        try {
-            privateKey = KeyChain.getPrivateKey(mContext, mAlias);
-            certificateChain = KeyChain.getCertificateChain(mContext, mAlias);
-        } catch (InterruptedException e) {
-            mHandler.ignore();
-            return null;
-        } catch (KeyChainException e) {
-            mHandler.ignore();
-            return null;
-        }
-        mHandler.proceed(privateKey, certificateChain);
-        return null;
-    }
-}
diff --git a/src/com/android/browser/NetworkStateHandler.java b/src/com/android/browser/NetworkStateHandler.java
index 9201f0f..618fde5 100644
--- a/src/com/android/browser/NetworkStateHandler.java
+++ b/src/com/android/browser/NetworkStateHandler.java
@@ -24,7 +24,6 @@
 import android.net.ConnectivityManager;
 import android.net.NetworkInfo;
 import android.webkit.WebView;
-import android.webkit.WebViewClassic;
 
 import com.android.browser.BrowserSettings;
 
@@ -114,8 +113,5 @@
 
     private void sendNetworkType(String type, String subtype) {
         WebView w = mController.getCurrentWebView();
-        if (w != null && BrowserWebView.isClassic()) {
-            WebViewClassic.fromWebView(w).setNetworkType(type, subtype);
-        }
     }
 }
diff --git a/src/com/android/browser/PreloadController.java b/src/com/android/browser/PreloadController.java
index 881f19e..acd9709 100644
--- a/src/com/android/browser/PreloadController.java
+++ b/src/com/android/browser/PreloadController.java
@@ -246,11 +246,6 @@
     }
 
     @Override
-    public void setupAutoFill(Message message) {
-        if (LOGD_ENABLED) Log.d(LOGTAG, "setupAutoFill()");
-    }
-
-    @Override
     public void bookmarkedStatusHasChanged(Tab tab) {
         if (LOGD_ENABLED) Log.d(LOGTAG, "bookmarkedStatusHasChanged()");
     }
diff --git a/src/com/android/browser/SnapshotBar.java b/src/com/android/browser/SnapshotBar.java
deleted file mode 100644
index 51e1226..0000000
--- a/src/com/android/browser/SnapshotBar.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.browser;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.os.Handler;
-import android.os.Message;
-import android.text.TextUtils;
-import android.util.AttributeSet;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.ViewConfiguration;
-import android.view.ViewPropertyAnimator;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.PopupMenu.OnMenuItemClickListener;
-import android.widget.TextView;
-
-import com.android.browser.UI.ComboViews;
-
-import java.text.DateFormat;
-import java.util.Date;
-
-public class SnapshotBar extends LinearLayout implements OnClickListener {
-
-    private static final int MSG_SHOW_TITLE = 1;
-    private static final long DURATION_SHOW_DATE = BaseUi.HIDE_TITLEBAR_DELAY;
-
-    private ImageView mFavicon;
-    private TextView mDate;
-    private TextView mTitle;
-    private View mBookmarks;
-    private TitleBar mTitleBar;
-    private View mTabSwitcher;
-    private View mOverflowMenu;
-    private View mToggleContainer;
-    private boolean mIsAnimating;
-    private ViewPropertyAnimator mTitleAnimator, mDateAnimator;
-    private float mAnimRadius = 20f;
-
-    public SnapshotBar(Context context) {
-        super(context);
-    }
-
-    public SnapshotBar(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    public SnapshotBar(Context context, AttributeSet attrs, int defStyle) {
-        super(context, attrs, defStyle);
-    }
-
-    public void setTitleBar(TitleBar titleBar) {
-        mTitleBar = titleBar;
-        setFavicon(null);
-    }
-
-    private Handler mHandler = new Handler() {
-        @Override
-        public void handleMessage(Message msg) {
-            if (msg.what == MSG_SHOW_TITLE) {
-                mIsAnimating = false;
-                showTitle();
-                mTitleBar.getUi().showTitleBarForDuration();
-            }
-        }
-    };
-
-    @Override
-    protected void onFinishInflate() {
-        super.onFinishInflate();
-        mFavicon = (ImageView) findViewById(R.id.favicon);
-        mDate = (TextView) findViewById(R.id.date);
-        mTitle = (TextView) findViewById(R.id.title);
-        mBookmarks = findViewById(R.id.all_btn);
-        mTabSwitcher = findViewById(R.id.tab_switcher);
-        mOverflowMenu = findViewById(R.id.more);
-        mToggleContainer = findViewById(R.id.toggle_container);
-
-        if (mBookmarks != null) {
-            mBookmarks.setOnClickListener(this);
-        }
-        if (mTabSwitcher != null) {
-            mTabSwitcher.setOnClickListener(this);
-        }
-        if (mOverflowMenu != null) {
-            mOverflowMenu.setOnClickListener(this);
-            boolean showMenu = !ViewConfiguration.get(getContext())
-                    .hasPermanentMenuKey();
-            mOverflowMenu.setVisibility(showMenu ? VISIBLE : GONE);
-        }
-        if (mToggleContainer != null) {
-            mToggleContainer.setOnClickListener(this);
-            resetAnimation();
-        }
-    }
-
-    @Override
-    protected void onLayout(boolean changed, int l, int t, int r, int b) {
-        super.onLayout(changed, l, t, r, b);
-        if (mToggleContainer != null) {
-            mAnimRadius = mToggleContainer.getHeight() / 2f;
-        }
-    }
-
-    void resetAnimation() {
-        if (mToggleContainer == null) {
-            // No animation needed/used
-            return;
-        }
-        if (mTitleAnimator != null) {
-            mTitleAnimator.cancel();
-            mTitleAnimator = null;
-        }
-        if (mDateAnimator != null) {
-            mDateAnimator.cancel();
-            mDateAnimator = null;
-        }
-        mIsAnimating = false;
-        mHandler.removeMessages(MSG_SHOW_TITLE);
-        mTitle.setAlpha(1f);
-        mTitle.setTranslationY(0f);
-        mTitle.setRotationX(0f);
-        mDate.setAlpha(0f);
-        mDate.setTranslationY(-mAnimRadius);
-        mDate.setRotationX(90f);
-    }
-
-    private void showDate() {
-        mTitleAnimator = mTitle.animate()
-                .alpha(0f)
-                .translationY(mAnimRadius)
-                .rotationX(-90f);
-        mDateAnimator = mDate.animate()
-                .alpha(1f)
-                .translationY(0f)
-                .rotationX(0f);
-    }
-
-    private void showTitle() {
-        mTitleAnimator = mTitle.animate()
-                .alpha(1f)
-                .translationY(0f)
-                .rotationX(0f);
-        mDateAnimator = mDate.animate()
-                .alpha(0f)
-                .translationY(-mAnimRadius)
-                .rotationX(90f);
-    }
-
-    @Override
-    public void onClick(View v) {
-        if (mBookmarks == v) {
-            mTitleBar.getUiController().bookmarksOrHistoryPicker(ComboViews.Bookmarks);
-        } else if (mTabSwitcher == v) {
-            ((PhoneUi) mTitleBar.getUi()).toggleNavScreen();
-        } else if (mOverflowMenu == v) {
-            NavigationBarBase navBar = mTitleBar.getNavigationBar();
-            if (navBar instanceof NavigationBarPhone) {
-                ((NavigationBarPhone)navBar).showMenu(mOverflowMenu);
-            }
-        } else if (mToggleContainer == v && !mIsAnimating) {
-            mIsAnimating = true;
-            showDate();
-            mTitleBar.getUi().showTitleBar();
-            Message m = mHandler.obtainMessage(MSG_SHOW_TITLE);
-            mHandler.sendMessageDelayed(m, DURATION_SHOW_DATE);
-        }
-    }
-
-    public void onTabDataChanged(Tab tab) {
-        if (!tab.isSnapshot()) return;
-        SnapshotTab snapshot = (SnapshotTab) tab;
-        DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.LONG);
-        mDate.setText(dateFormat.format(new Date(snapshot.getDateCreated())));
-        String title = snapshot.getTitle();
-        if (TextUtils.isEmpty(title)) {
-            title = UrlUtils.stripUrl(snapshot.getUrl());
-        }
-        mTitle.setText(title);
-        setFavicon(tab.getFavicon());
-        resetAnimation();
-    }
-
-    public void setFavicon(Bitmap icon) {
-        if (mFavicon == null) return;
-        mFavicon.setImageDrawable(mTitleBar.getUi().getFaviconDrawable(icon));
-    }
-
-    public boolean isAnimating() {
-        return mIsAnimating;
-    }
-
-}
diff --git a/src/com/android/browser/SnapshotTab.java b/src/com/android/browser/SnapshotTab.java
deleted file mode 100644
index e14f095..0000000
--- a/src/com/android/browser/SnapshotTab.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.browser;
-
-import android.content.ContentResolver;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.Context;
-import android.database.Cursor;
-import android.graphics.BitmapFactory;
-import android.net.Uri;
-import android.os.AsyncTask;
-import android.os.Bundle;
-import android.text.TextUtils;
-import android.util.Log;
-import android.webkit.WebView;
-import android.webkit.WebViewClassic;
-
-import com.android.browser.provider.SnapshotProvider.Snapshots;
-
-import java.io.ByteArrayInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.util.Map;
-import java.util.zip.GZIPInputStream;
-
-
-public class SnapshotTab extends Tab {
-
-    private static final String LOGTAG = "SnapshotTab";
-
-    private long mSnapshotId;
-    private LoadData mLoadTask;
-    private WebViewFactory mWebViewFactory;
-    private int mBackgroundColor;
-    private long mDateCreated;
-    private boolean mIsLive;
-
-    public SnapshotTab(WebViewController wvcontroller, long snapshotId) {
-        super(wvcontroller, null, null);
-        mSnapshotId = snapshotId;
-        mWebViewFactory = mWebViewController.getWebViewFactory();
-        WebView web = mWebViewFactory.createWebView(false);
-        setWebView(web);
-        loadData();
-    }
-
-    @Override
-    void putInForeground() {
-        if (getWebView() == null) {
-            WebView web = mWebViewFactory.createWebView(false);
-            if (mBackgroundColor != 0) {
-                web.setBackgroundColor(mBackgroundColor);
-            }
-            setWebView(web);
-            loadData();
-        }
-        super.putInForeground();
-    }
-
-    @Override
-    void putInBackground() {
-        if (getWebView() == null) return;
-        super.putInBackground();
-    }
-
-    void loadData() {
-        if (mLoadTask == null) {
-            mLoadTask = new LoadData(this, mContext);
-            mLoadTask.execute();
-        }
-    }
-
-    @Override
-    void addChildTab(Tab child) {
-        if (mIsLive) {
-            super.addChildTab(child);
-        } else {
-            throw new IllegalStateException("Snapshot tabs cannot have child tabs!");
-        }
-    }
-
-    @Override
-    public boolean isSnapshot() {
-        return !mIsLive;
-    }
-
-    public long getSnapshotId() {
-        return mSnapshotId;
-    }
-
-    @Override
-    public ContentValues createSnapshotValues() {
-        if (mIsLive) {
-            return super.createSnapshotValues();
-        }
-        return null;
-    }
-
-    @Override
-    public Bundle saveState() {
-        if (mIsLive) {
-            return super.saveState();
-        }
-        return null;
-    }
-
-    public long getDateCreated() {
-        return mDateCreated;
-    }
-
-    @Override
-    public void loadUrl(String url, Map<String, String> headers) {
-        if (!mIsLive) {
-            mIsLive = true;
-            getWebViewClassic().clearViewState();
-        }
-        super.loadUrl(url, headers);
-    }
-
-    @Override
-    public boolean canGoBack() {
-        return super.canGoBack() || mIsLive;
-    }
-
-    @Override
-    public boolean canGoForward() {
-        return mIsLive && super.canGoForward();
-    }
-
-    @Override
-    public void goBack() {
-        if (super.canGoBack()) {
-            super.goBack();
-        } else {
-            mIsLive = false;
-            getWebView().stopLoading();
-            loadData();
-        }
-    }
-
-    static class LoadData extends AsyncTask<Void, Void, Cursor> {
-
-        static final String[] PROJECTION = new String[] {
-            Snapshots._ID, // 0
-            Snapshots.URL, // 1
-            Snapshots.TITLE, // 2
-            Snapshots.FAVICON, // 3
-            Snapshots.VIEWSTATE, // 4
-            Snapshots.BACKGROUND, // 5
-            Snapshots.DATE_CREATED, // 6
-            Snapshots.VIEWSTATE_PATH, // 7
-        };
-        static final int SNAPSHOT_ID = 0;
-        static final int SNAPSHOT_URL = 1;
-        static final int SNAPSHOT_TITLE = 2;
-        static final int SNAPSHOT_FAVICON = 3;
-        static final int SNAPSHOT_VIEWSTATE = 4;
-        static final int SNAPSHOT_BACKGROUND = 5;
-        static final int SNAPSHOT_DATE_CREATED = 6;
-        static final int SNAPSHOT_VIEWSTATE_PATH = 7;
-
-        private SnapshotTab mTab;
-        private ContentResolver mContentResolver;
-        private Context mContext;
-
-        public LoadData(SnapshotTab t, Context context) {
-            mTab = t;
-            mContentResolver = context.getContentResolver();
-            mContext = context;
-        }
-
-        @Override
-        protected Cursor doInBackground(Void... params) {
-            long id = mTab.mSnapshotId;
-            Uri uri = ContentUris.withAppendedId(Snapshots.CONTENT_URI, id);
-            return mContentResolver.query(uri, PROJECTION, null, null, null);
-        }
-
-        private InputStream getInputStream(Cursor c) throws FileNotFoundException {
-            String path = c.getString(SNAPSHOT_VIEWSTATE_PATH);
-            if (!TextUtils.isEmpty(path)) {
-                return mContext.openFileInput(path);
-            }
-            byte[] data = c.getBlob(SNAPSHOT_VIEWSTATE);
-            ByteArrayInputStream bis = new ByteArrayInputStream(data);
-            return bis;
-        }
-
-        @Override
-        protected void onPostExecute(Cursor result) {
-            try {
-                if (result.moveToFirst()) {
-                    mTab.mCurrentState.mTitle = result.getString(SNAPSHOT_TITLE);
-                    mTab.mCurrentState.mUrl = result.getString(SNAPSHOT_URL);
-                    byte[] favicon = result.getBlob(SNAPSHOT_FAVICON);
-                    if (favicon != null) {
-                        mTab.mCurrentState.mFavicon = BitmapFactory
-                                .decodeByteArray(favicon, 0, favicon.length);
-                    }
-                    WebViewClassic web = mTab.getWebViewClassic();
-                    if (web != null) {
-                        InputStream ins = getInputStream(result);
-                        GZIPInputStream stream = new GZIPInputStream(ins);
-                        web.loadViewState(stream);
-                    }
-                    mTab.mBackgroundColor = result.getInt(SNAPSHOT_BACKGROUND);
-                    mTab.mDateCreated = result.getLong(SNAPSHOT_DATE_CREATED);
-                    mTab.mWebViewController.onPageFinished(mTab);
-                }
-            } catch (Exception e) {
-                Log.w(LOGTAG, "Failed to load view state, closing tab", e);
-                mTab.mWebViewController.closeTab(mTab);
-            } finally {
-                if (result != null) {
-                    result.close();
-                }
-                mTab.mLoadTask = null;
-            }
-        }
-
-    }
-
-    @Override
-    protected void persistThumbnail() {
-        if (mIsLive) {
-            super.persistThumbnail();
-        }
-    }
-}
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index e3a0333..026799b 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -47,7 +47,6 @@
 import android.view.View;
 import android.view.ViewStub;
 import android.webkit.BrowserDownloadListener;
-import android.webkit.ClientCertRequestHandler;
 import android.webkit.ConsoleMessage;
 import android.webkit.GeolocationPermissions;
 import android.webkit.HttpAuthHandler;
@@ -62,9 +61,7 @@
 import android.webkit.WebStorage;
 import android.webkit.WebView;
 import android.webkit.WebView.PictureListener;
-import android.webkit.WebViewClassic;
 import android.webkit.WebViewClient;
-import android.webkit.WebViewClientClassicExt;
 import android.widget.CheckBox;
 import android.widget.Toast;
 
@@ -324,7 +321,7 @@
     // WebViewClient implementation for the main WebView
     // -------------------------------------------------------------------------
 
-    private final WebViewClientClassicExt mWebViewClient = new WebViewClientClassicExt() {
+    private final WebViewClient mWebViewClient = new WebViewClient() {
         private Message mDontResend;
         private Message mResend;
 
@@ -560,56 +557,7 @@
             }
         }
 
-        /**
-         * Called when an SSL error occurred while loading a resource, but the
-         * WebView but chose to proceed anyway based on a decision retained
-         * from a previous response to onReceivedSslError(). We update our
-         * security state to reflect this.
-         */
-        @Override
-        public void onProceededAfterSslError(WebView view, SslError error) {
-            handleProceededAfterSslError(error);
-        }
-
-        /**
-         * Displays client certificate request to the user.
-         */
-        @Override
-        public void onReceivedClientCertRequest(final WebView view,
-                final ClientCertRequestHandler handler, final String host_and_port) {
-            if (!mInForeground) {
-                handler.ignore();
-                return;
-            }
-            int colon = host_and_port.lastIndexOf(':');
-            String host;
-            int port;
-            if (colon == -1) {
-                host = host_and_port;
-                port = -1;
-            } else {
-                String portString = host_and_port.substring(colon + 1);
-                try {
-                    port = Integer.parseInt(portString);
-                    host = host_and_port.substring(0, colon);
-                } catch  (NumberFormatException e) {
-                    host = host_and_port;
-                    port = -1;
-                }
-            }
-            KeyChain.choosePrivateKeyAlias(
-                    mWebViewController.getActivity(), new KeyChainAliasCallback() {
-                @Override public void alias(String alias) {
-                    if (alias == null) {
-                        handler.cancel();
-                        return;
-                    }
-                    new KeyChainLookup(mContext, handler, alias).execute();
-                }
-            }, null, null, host, port, null);
-        }
-
-        /**
+       /**
          * Handles an HTTP authentication request.
          *
          * @param handler The authentication handler
@@ -1007,39 +955,6 @@
             mWebViewController.getVisitedHistory(callback);
         }
 
-        @Override
-        public void setupAutoFill(Message message) {
-            // Prompt the user to set up their profile.
-            final Message msg = message;
-            AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
-            LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(
-                    Context.LAYOUT_INFLATER_SERVICE);
-            final View layout = inflater.inflate(R.layout.setup_autofill_dialog, null);
-
-            builder.setView(layout)
-                .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
-                    @Override
-                    public void onClick(DialogInterface dialog, int id) {
-                        CheckBox disableAutoFill = (CheckBox) layout.findViewById(
-                                R.id.setup_autofill_dialog_disable_autofill);
-
-                        if (disableAutoFill.isChecked()) {
-                            // Disable autofill and show a toast with how to turn it on again.
-                            mSettings.setAutofillEnabled(false);
-                            Toast.makeText(mContext,
-                                    R.string.autofill_setup_dialog_negative_toast,
-                                    Toast.LENGTH_LONG).show();
-                        } else {
-                            // Take user to the AutoFill profile editor. When they return,
-                            // we will send the message that we pass here which will trigger
-                            // the form to get filled out with their new profile.
-                            mWebViewController.setupAutoFill(msg);
-                        }
-                    }
-                })
-                .setNegativeButton(R.string.cancel, null)
-                .show();
-        }
     };
 
     // -------------------------------------------------------------------------
@@ -1048,12 +963,12 @@
 
     // Subclass of WebViewClient used in subwindows to notify the main
     // WebViewClient of certain WebView activities.
-    private static class SubWindowClient extends WebViewClientClassicExt {
+    private static class SubWindowClient extends WebViewClient {
         // The main WebViewClient.
-        private final WebViewClientClassicExt mClient;
+        private final WebViewClient mClient;
         private final WebViewController mController;
 
-        SubWindowClient(WebViewClientClassicExt client, WebViewController controller) {
+        SubWindowClient(WebViewClient client, WebViewController controller) {
             mClient = client;
             mController = controller;
         }
@@ -1079,11 +994,6 @@
             mClient.onReceivedSslError(view, handler, error);
         }
         @Override
-        public void onReceivedClientCertRequest(WebView view,
-                ClientCertRequestHandler handler, String host_and_port) {
-            mClient.onReceivedClientCertRequest(view, handler, host_and_port);
-        }
-        @Override
         public void onReceivedHttpAuthRequest(WebView view,
                 HttpAuthHandler handler, String host, String realm) {
             mClient.onReceivedHttpAuthRequest(view, handler, host, realm);
@@ -1293,9 +1203,6 @@
             // does a redirect after a period of time. The user could have
             // switched to another tab while waiting for the download to start.
             mMainView.setDownloadListener(mDownloadListener);
-            if (BrowserWebView.isClassic()) {
-                getWebViewClassic().setWebBackForwardListClient(mWebBackForwardListClient);
-            }
             TabControl tc = mWebViewController.getTabControl();
             if (tc != null && tc.getOnThumbnailUpdatedListener() != null) {
                 mMainView.setPictureListener(this);
@@ -1531,18 +1438,6 @@
         return mMainView;
     }
 
-    /**
-     * Return the underlying WebViewClassic implementation. As with getWebView,
-     * this maybe null for background tabs.
-     * @return The main WebView of this tab.
-     */
-    WebViewClassic getWebViewClassic() {
-        if (!BrowserWebView.isClassic()) {
-            return null;
-        }
-        return WebViewClassic.fromWebView(mMainView);
-    }
-
     void setViewContainer(View container) {
         mContainer = container;
     }
@@ -1824,63 +1719,14 @@
      * Must be called on the UI thread
      */
     public ContentValues createSnapshotValues() {
-        WebViewClassic web = getWebViewClassic();
-        if (web == null) return null;
-        ContentValues values = new ContentValues();
-        values.put(Snapshots.TITLE, mCurrentState.mTitle);
-        values.put(Snapshots.URL, mCurrentState.mUrl);
-        values.put(Snapshots.BACKGROUND, web.getPageBackgroundColor());
-        values.put(Snapshots.DATE_CREATED, System.currentTimeMillis());
-        values.put(Snapshots.FAVICON, compressBitmap(getFavicon()));
-        Bitmap screenshot = Controller.createScreenshot(mMainView,
-                Controller.getDesiredThumbnailWidth(mContext),
-                Controller.getDesiredThumbnailHeight(mContext));
-        values.put(Snapshots.THUMBNAIL, compressBitmap(screenshot));
-        return values;
+        return null;
     }
 
     /**
      * Probably want to call this on a background thread
      */
     public boolean saveViewState(ContentValues values) {
-        WebViewClassic web = getWebViewClassic();
-        if (web == null) return false;
-        String path = UUID.randomUUID().toString();
-        SaveCallback callback = new SaveCallback();
-        OutputStream outs = null;
-        try {
-            outs = mContext.openFileOutput(path, Context.MODE_PRIVATE);
-            GZIPOutputStream stream = new GZIPOutputStream(outs);
-            synchronized (callback) {
-                web.saveViewState(stream, callback);
-                callback.wait();
-            }
-            stream.flush();
-            stream.close();
-        } catch (Exception e) {
-            Log.w(LOGTAG, "Failed to save view state", e);
-            if (outs != null) {
-                try {
-                    outs.close();
-                } catch (IOException ignore) {}
-            }
-            File file = mContext.getFileStreamPath(path);
-            if (file.exists() && !file.delete()) {
-                file.deleteOnExit();
-            }
-            return false;
-        }
-        File savedFile = mContext.getFileStreamPath(path);
-        if (!callback.mResult) {
-            if (!savedFile.delete()) {
-                savedFile.deleteOnExit();
-            }
-            return false;
-        }
-        long size = savedFile.length();
-        values.put(Snapshots.VIEWSTATE_PATH, path);
-        values.put(Snapshots.VIEWSTATE_SIZE, size);
-        return true;
+        return false;
     }
 
     public byte[] compressBitmap(Bitmap bitmap) {
diff --git a/src/com/android/browser/TabControl.java b/src/com/android/browser/TabControl.java
index 150ece0..8cb500d 100644
--- a/src/com/android/browser/TabControl.java
+++ b/src/com/android/browser/TabControl.java
@@ -216,12 +216,6 @@
         return createNewTab(false);
     }
 
-    SnapshotTab createSnapshotTab(long snapshotId) {
-        SnapshotTab t = new SnapshotTab(mController, snapshotId);
-        mTabs.add(t);
-        return t;
-    }
-
     /**
      * Remove the parent child relationships from all tabs.
      */
@@ -670,7 +664,7 @@
         // Display the new current tab
         mCurrentTab = mTabs.indexOf(newTab);
         WebView mainView = newTab.getWebView();
-        boolean needRestore = !newTab.isSnapshot() && (mainView == null);
+        boolean needRestore = mainView == null;
         if (needRestore) {
             // Same work as in createNewTab() except don't do new Tab()
             mainView = createNewWebView();
diff --git a/src/com/android/browser/TitleBar.java b/src/com/android/browser/TitleBar.java
index a0cc857..83c6626 100644
--- a/src/com/android/browser/TitleBar.java
+++ b/src/com/android/browser/TitleBar.java
@@ -53,7 +53,6 @@
     private AutologinBar mAutoLogin;
     private NavigationBarBase mNavBar;
     private boolean mUseQuickControls;
-    private SnapshotBar mSnapshotBar;
 
     //state
     private boolean mShowing;
@@ -91,16 +90,6 @@
         mAutoLogin.setTitleBar(this);
     }
 
-    private void inflateSnapshotBar() {
-        if (mSnapshotBar != null) {
-            return;
-        }
-
-        ViewStub stub = (ViewStub) findViewById(R.id.snapshotbar_stub);
-        mSnapshotBar = (SnapshotBar) stub.inflate();
-        mSnapshotBar.setTitleBar(this);
-    }
-
     @Override
     protected void onConfigurationChanged(Configuration config) {
         super.onConfigurationChanged(config);
@@ -119,14 +108,10 @@
     }
 
     private void setFixedTitleBar() {
-        boolean isFixed = !mUseQuickControls
-                && !mContext.getResources().getBoolean(R.bool.hide_title);
-        isFixed |= mAccessibilityManager.isEnabled();
-        isFixed |= !BrowserWebView.isClassic();
         // If getParent() returns null, we are initializing
         ViewGroup parent = (ViewGroup)getParent();
-        if (mIsFixedTitleBar == isFixed && parent != null) return;
-        mIsFixedTitleBar = isFixed;
+        if (mIsFixedTitleBar && parent != null) return;
+        mIsFixedTitleBar = true;
         setSkipTitleBarAnimations(true);
         show();
         setSkipTitleBarAnimations(false);
@@ -365,9 +350,7 @@
     }
 
     public boolean wantsToBeVisible() {
-        return inAutoLogin()
-            || (mSnapshotBar != null && mSnapshotBar.getVisibility() == View.VISIBLE
-                    && mSnapshotBar.isAnimating());
+        return inAutoLogin();
     }
 
     private boolean inAutoLogin() {
@@ -419,20 +402,7 @@
     }
 
     public void onTabDataChanged(Tab tab) {
-        if (mSnapshotBar != null) {
-            mSnapshotBar.onTabDataChanged(tab);
-        }
-
-        if (tab.isSnapshot()) {
-            inflateSnapshotBar();
-            mSnapshotBar.setVisibility(VISIBLE);
-            mNavBar.setVisibility(GONE);
-        } else {
-            if (mSnapshotBar != null) {
-                mSnapshotBar.setVisibility(GONE);
-            }
-            mNavBar.setVisibility(VISIBLE);
-        }
+        mNavBar.setVisibility(VISIBLE);
     }
 
     public void onScrollChanged() {
diff --git a/src/com/android/browser/UiController.java b/src/com/android/browser/UiController.java
index 683e473..f00f1a2 100644
--- a/src/com/android/browser/UiController.java
+++ b/src/com/android/browser/UiController.java
@@ -91,8 +91,6 @@
 
     boolean onOptionsItemSelected(MenuItem item);
 
-    SnapshotTab createNewSnapshotTab(long snapshotId, boolean setActive);
-
     void loadUrl(Tab tab, String url);
 
     void setBlockEvents(boolean block);
diff --git a/src/com/android/browser/WebViewController.java b/src/com/android/browser/WebViewController.java
index e814ff9..498f8e7 100644
--- a/src/com/android/browser/WebViewController.java
+++ b/src/com/android/browser/WebViewController.java
@@ -111,8 +111,6 @@
 
     void closeTab(Tab tab);
 
-    void setupAutoFill(Message message);
-
     void bookmarkedStatusHasChanged(Tab tab);
 
     void showAutoLogin(Tab tab);
diff --git a/src/com/android/browser/XLargeUi.java b/src/com/android/browser/XLargeUi.java
index df7a586..0d9b00e 100644
--- a/src/com/android/browser/XLargeUi.java
+++ b/src/com/android/browser/XLargeUi.java
@@ -32,7 +32,6 @@
 import android.view.Menu;
 import android.view.MenuItem;
 import android.webkit.WebView;
-import android.webkit.WebViewClassic;
 
 import java.util.List;
 
@@ -117,9 +116,6 @@
 
     void stopWebViewScrolling() {
         BrowserWebView web = (BrowserWebView) mUiController.getCurrentWebView();
-        if (web != null && BrowserWebView.isClassic()) {
-            WebViewClassic.fromWebView(web).stopScroll();
-        }
     }
 
     @Override
diff --git a/src/com/android/browser/preferences/GeneralPreferencesFragment.java b/src/com/android/browser/preferences/GeneralPreferencesFragment.java
index c018474..26fb05f 100644
--- a/src/com/android/browser/preferences/GeneralPreferencesFragment.java
+++ b/src/com/android/browser/preferences/GeneralPreferencesFragment.java
@@ -198,17 +198,4 @@
         }
         return null;
     }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-
-        refreshUi();
-    }
-
-    void refreshUi() {
-        PreferenceScreen autoFillSettings =
-                (PreferenceScreen)findPreference(PreferenceKeys.PREF_AUTOFILL_PROFILE);
-        autoFillSettings.setDependency(PreferenceKeys.PREF_AUTOFILL_ENABLED);
-    }
 }
diff --git a/src/com/android/browser/preferences/InvertedContrastPreview.java b/src/com/android/browser/preferences/InvertedContrastPreview.java
index 2b8ad47..988f64a 100644
--- a/src/com/android/browser/preferences/InvertedContrastPreview.java
+++ b/src/com/android/browser/preferences/InvertedContrastPreview.java
@@ -19,8 +19,6 @@
 import android.content.Context;
 import android.text.TextUtils;
 import android.util.AttributeSet;
-import android.webkit.WebSettingsClassic;
-import android.webkit.WebViewClassic;
 
 import com.android.browser.BrowserSettings;
 import com.android.browser.BrowserWebView;
@@ -76,17 +74,6 @@
 
     @Override
     protected void updatePreview(boolean forceReload) {
-        if (mWebView == null || !BrowserWebView.isClassic()) return;
-
-        WebSettingsClassic ws = WebViewClassic.fromWebView(mWebView).getSettings();
-        BrowserSettings bs = BrowserSettings.getInstance();
-        ws.setProperty(WebViewProperties.gfxInvertedScreen,
-                bs.useInvertedRendering() ? "true" : "false");
-        ws.setProperty(WebViewProperties.gfxInvertedScreenContrast,
-                Float.toString(bs.getInvertedContrast()));
-        if (forceReload) {
-            mWebView.loadData(mHtml, "text/html", null);
-        }
     }
 
 }
diff --git a/tests/src/com/android/browser/PopularUrlsTest.java b/tests/src/com/android/browser/PopularUrlsTest.java
deleted file mode 100644
index 566d74b..0000000
--- a/tests/src/com/android/browser/PopularUrlsTest.java
+++ /dev/null
@@ -1,583 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.browser;
-
-import android.app.Instrumentation;
-import android.content.Intent;
-import android.net.Uri;
-import android.net.http.SslError;
-import android.os.Environment;
-import android.provider.Browser;
-import android.test.ActivityInstrumentationTestCase2;
-import android.text.TextUtils;
-import android.util.Log;
-import android.webkit.ClientCertRequestHandler;
-import android.webkit.DownloadListener;
-import android.webkit.HttpAuthHandler;
-import android.webkit.JsPromptResult;
-import android.webkit.JsResult;
-import android.webkit.SslErrorHandler;
-import android.webkit.WebView;
-import android.webkit.WebViewClassic;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-/**
- *
- * Iterates over a list of URLs from a file and outputs the time to load each.
- */
-public class PopularUrlsTest extends ActivityInstrumentationTestCase2<BrowserActivity> {
-
-    private final static String TAG = "PopularUrlsTest";
-    private final static String newLine = System.getProperty("line.separator");
-    private final static String sInputFile = "popular_urls.txt";
-    private final static String sOutputFile = "test_output.txt";
-    private final static String sStatusFile = "test_status.txt";
-    private final static File sExternalStorage = Environment.getExternalStorageDirectory();
-
-    private final static int PERF_LOOPCOUNT = 10;
-    private final static int STABILITY_LOOPCOUNT = 1;
-    private final static int PAGE_LOAD_TIMEOUT = 120000; // 2 minutes
-
-    private BrowserActivity mActivity = null;
-    private Controller mController = null;
-    private Instrumentation mInst = null;
-    private CountDownLatch mLatch = new CountDownLatch(1);
-    private RunStatus mStatus;
-    private boolean pageLoadFinishCalled, pageProgressFull;
-
-    public PopularUrlsTest() {
-        super(BrowserActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("about:blank"));
-        i.putExtra(Controller.NO_CRASH_RECOVERY, true);
-        setActivityIntent(i);
-        mActivity = getActivity();
-        mController = mActivity.getController();
-        mInst = getInstrumentation();
-        mInst.waitForIdleSync();
-
-        mStatus = RunStatus.load();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        if (mStatus != null) {
-            mStatus.cleanUp();
-        }
-
-        super.tearDown();
-    }
-
-    BufferedReader getInputStream() throws FileNotFoundException {
-        return getInputStream(sInputFile);
-    }
-
-    BufferedReader getInputStream(String inputFile) throws FileNotFoundException {
-        FileReader fileReader = new FileReader(new File(sExternalStorage, inputFile));
-        BufferedReader bufferedReader = new BufferedReader(fileReader);
-
-        return bufferedReader;
-    }
-
-    OutputStreamWriter getOutputStream() throws IOException {
-        return getOutputStream(sOutputFile);
-    }
-
-    OutputStreamWriter getOutputStream(String outputFile) throws IOException {
-        return new FileWriter(new File(sExternalStorage, outputFile), mStatus.getIsRecovery());
-    }
-
-    /**
-     * Gets the browser ready for testing by starting the application
-     * and wrapping the WebView's helper clients.
-     */
-    void setUpBrowser() {
-        mInst.runOnMainSync(new Runnable() {
-            @Override
-            public void run() {
-                setupBrowserInternal();
-            }
-        });
-    }
-
-    void setupBrowserInternal() {
-        Tab tab = mController.getTabControl().getCurrentTab();
-        WebView webView = tab.getWebView();
-
-        webView.setWebChromeClient(new TestWebChromeClient(
-                WebViewClassic.fromWebView(webView).getWebChromeClient()) {
-
-            @Override
-            public void onProgressChanged(WebView view, int newProgress) {
-                super.onProgressChanged(view, newProgress);
-                if (newProgress >= 100) {
-                    if (!pageProgressFull) {
-                        // void duplicate calls
-                        pageProgressFull  = true;
-                        if (pageLoadFinishCalled) {
-                            //reset latch and move forward only if both indicators are true
-                            resetLatch();
-                        }
-                    }
-                }
-            }
-
-            /**
-             * Dismisses and logs Javascript alerts.
-             */
-            @Override
-            public boolean onJsAlert(WebView view, String url, String message,
-                    JsResult result) {
-                String logMsg = String.format("JS Alert '%s' received from %s", message, url);
-                Log.w(TAG, logMsg);
-                result.confirm();
-
-                return true;
-            }
-
-            /**
-             * Confirms and logs Javascript alerts.
-             */
-            @Override
-            public boolean onJsConfirm(WebView view, String url, String message,
-                    JsResult result) {
-                String logMsg = String.format("JS Confirmation '%s' received from %s",
-                        message, url);
-                Log.w(TAG, logMsg);
-                result.confirm();
-
-                return true;
-            }
-
-            /**
-             * Confirms and logs Javascript alerts, providing the default value.
-             */
-            @Override
-            public boolean onJsPrompt(WebView view, String url, String message,
-                    String defaultValue, JsPromptResult result) {
-                String logMsg = String.format("JS Prompt '%s' received from %s; " +
-                        "Giving default value '%s'", message, url, defaultValue);
-                Log.w(TAG, logMsg);
-                result.confirm(defaultValue);
-
-                return true;
-            }
-
-            /*
-             * Skip the unload confirmation
-             */
-            @Override
-            public boolean onJsBeforeUnload(
-                    WebView view, String url, String message, JsResult result) {
-                result.confirm();
-                return true;
-            }
-        });
-
-        webView.setWebViewClient(new TestWebViewClient(
-                WebViewClassic.fromWebView(webView).getWebViewClient()) {
-
-            /**
-             * Bypasses and logs errors.
-             */
-            @Override
-            public void onReceivedError(WebView view, int errorCode,
-                    String description, String failingUrl) {
-                String message = String.format("Error '%s' (%d) loading url: %s",
-                        description, errorCode, failingUrl);
-                Log.w(TAG, message);
-            }
-
-            /**
-             * Ignores and logs SSL errors.
-             */
-            @Override
-            public void onReceivedSslError(WebView view, SslErrorHandler handler,
-                    SslError error) {
-                Log.w(TAG, "SSL error: " + error);
-                handler.proceed();
-            }
-
-            /**
-             * Ignores and logs SSL client certificate requests.
-             */
-            @Override
-            public void onReceivedClientCertRequest(WebView view, ClientCertRequestHandler handler,
-                    String host_and_port) {
-                Log.w(TAG, "SSL client certificate request: " + host_and_port);
-                handler.cancel();
-            }
-
-            /**
-             * Ignores http auth with dummy username and password
-             */
-            @Override
-            public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler,
-                    String host, String realm) {
-                handler.proceed("user", "passwd");
-            }
-
-            /* (non-Javadoc)
-             * @see com.android.browser.TestWebViewClient#onPageFinished(android.webkit.WebView, java.lang.String)
-             */
-            @Override
-            public void onPageFinished(WebView view, String url) {
-                super.onPageFinished(view, url);
-                if (!pageLoadFinishCalled) {
-                    pageLoadFinishCalled = true;
-                    if (pageProgressFull) {
-                        //reset latch and move forward only if both indicators are true
-                        resetLatch();
-                    }
-                }
-            }
-
-            @Override
-            public boolean shouldOverrideUrlLoading(WebView view, String url) {
-                if (!(url.startsWith("http://") || url.startsWith("https://"))) {
-                    Log.v(TAG, String.format("suppressing non-http url scheme: %s", url));
-                    return true;
-                }
-                return super.shouldOverrideUrlLoading(view, url);
-            }
-        });
-
-        webView.setDownloadListener(new DownloadListener() {
-
-            @Override
-            public void onDownloadStart(String url, String userAgent, String contentDisposition,
-                    String mimetype, long contentLength) {
-                Log.v(TAG, String.format("Download request ignored: %s", url));
-            }
-        });
-    }
-
-    void resetLatch() {
-        if (mLatch.getCount() != 1) {
-            Log.w(TAG, "Expecting latch to be 1, but it's not!");
-        } else {
-            mLatch.countDown();
-        }
-    }
-
-    void resetForNewPage() {
-        mLatch = new CountDownLatch(1);
-        pageLoadFinishCalled = false;
-        pageProgressFull = false;
-    }
-
-    void waitForLoad() throws InterruptedException {
-        boolean timedout = !mLatch.await(PAGE_LOAD_TIMEOUT, TimeUnit.MILLISECONDS);
-        if (timedout) {
-            Log.w(TAG, "page timeout. trying to stop.");
-            // try to stop page load
-            mInst.runOnMainSync(new Runnable(){
-                public void run() {
-                    mController.getTabControl().getCurrentTab().getWebView().stopLoading();
-                }
-            });
-            // try to wait for count down latch again
-            timedout = !mLatch.await(5000, TimeUnit.MILLISECONDS);
-            if (timedout) {
-                throw new RuntimeException("failed to stop timedout site, is browser pegged?");
-            }
-        }
-    }
-
-    private static class RunStatus {
-        private File mFile;
-        private int iteration;
-        private int page;
-        private String url;
-        private boolean isRecovery;
-        private boolean allClear;
-
-        private RunStatus(File file) throws IOException {
-            mFile = file;
-            FileReader input = null;
-            BufferedReader reader = null;
-            isRecovery = false;
-            allClear = false;
-            iteration = 0;
-            page = 0;
-            try {
-                input = new FileReader(mFile);
-                isRecovery = true;
-                reader = new BufferedReader(input);
-                String line = reader.readLine();
-                if (line == null)
-                    return;
-                iteration = Integer.parseInt(line);
-                line = reader.readLine();
-                if (line == null)
-                    return;
-                page = Integer.parseInt(line);
-            } catch (FileNotFoundException ex) {
-                return;
-            } catch (NumberFormatException nfe) {
-                Log.wtf(TAG, "unexpected data in status file, will start from begining");
-                return;
-            } finally {
-                try {
-                    if (reader != null) {
-                        reader.close();
-                    }
-                } finally {
-                    if (input != null) {
-                        input.close();
-                    }
-                }
-            }
-        }
-
-        public static RunStatus load() throws IOException {
-            return load(sStatusFile);
-        }
-
-        public static RunStatus load(String file) throws IOException {
-            return new RunStatus(new File(sExternalStorage, file));
-        }
-
-        public void write() throws IOException {
-            FileWriter output = null;
-            if (mFile.exists()) {
-                mFile.delete();
-            }
-            try {
-                output = new FileWriter(mFile);
-                output.write(iteration + newLine);
-                output.write(page + newLine);
-                output.write(url + newLine);
-            } finally {
-                if (output != null) {
-                    output.close();
-                }
-            }
-        }
-
-        public void cleanUp() {
-            // only perform cleanup when allClear flag is set
-            // i.e. when the test was not interrupted by a Java crash
-            if (mFile.exists() && allClear) {
-                mFile.delete();
-            }
-        }
-
-        public void resetPage() {
-            page = 0;
-        }
-
-        public void incrementPage() {
-            ++page;
-            allClear = true;
-        }
-
-        public void incrementIteration() {
-            ++iteration;
-        }
-
-        public int getPage() {
-            return page;
-        }
-
-        public int getIteration() {
-            return iteration;
-        }
-
-        public boolean getIsRecovery() {
-            return isRecovery;
-        }
-
-        public void setUrl(String url) {
-            this.url = url;
-            allClear = false;
-        }
-    }
-
-    /**
-     * Loops over a list of URLs, points the browser to each one, and records the time elapsed.
-     *
-     * @param input the reader from which to get the URLs.
-     * @param writer the writer to which to output the results.
-     * @param clearCache determines whether the cache is cleared before loading each page
-     * @param loopCount the number of times to loop through the list of pages
-     * @throws IOException unable to read from input or write to writer.
-     * @throws InterruptedException the thread was interrupted waiting for the page to load.
-     */
-    void loopUrls(BufferedReader input, OutputStreamWriter writer,
-            boolean clearCache, int loopCount)
-            throws IOException, InterruptedException {
-        Tab tab = mController.getTabControl().getCurrentTab();
-        WebView webView = tab.getWebView();
-
-        List<String> pages = new LinkedList<String>();
-
-        String page;
-        while (null != (page = input.readLine())) {
-            if (!TextUtils.isEmpty(page)) {
-                pages.add(page);
-            }
-        }
-
-        Iterator<String> iterator = pages.iterator();
-        for (int i = 0; i < mStatus.getPage(); ++i) {
-            iterator.next();
-        }
-
-        if (mStatus.getIsRecovery()) {
-            Log.e(TAG, "Recovering after crash: " + iterator.next());
-            mStatus.incrementPage();
-        }
-
-        while (mStatus.getIteration() < loopCount) {
-            if (clearCache) {
-                clearCacheUiThread(webView, true);
-            }
-            while(iterator.hasNext()) {
-                page = iterator.next();
-                mStatus.setUrl(page);
-                mStatus.write();
-                Log.i(TAG, "start: " + page);
-                Uri uri = Uri.parse(page);
-                final Intent intent = new Intent(Intent.ACTION_VIEW, uri);
-                intent.putExtra(Browser.EXTRA_APPLICATION_ID,
-                    getInstrumentation().getTargetContext().getPackageName());
-
-                long startTime = System.currentTimeMillis();
-                resetForNewPage();
-                mInst.runOnMainSync(new Runnable() {
-
-                    public void run() {
-                        mActivity.onNewIntent(intent);
-                    }
-
-                });
-                waitForLoad();
-                long stopTime = System.currentTimeMillis();
-
-                String url = getUrlUiThread(webView);
-                Log.i(TAG, "finish: " + url);
-
-                if (writer != null) {
-                    writer.write(page + "|" + (stopTime - startTime) + newLine);
-                    writer.flush();
-                }
-
-                mStatus.incrementPage();
-            }
-            mStatus.incrementIteration();
-            mStatus.resetPage();
-            iterator = pages.iterator();
-        }
-    }
-
-    public void testLoadPerformance() throws IOException, InterruptedException {
-        setUpBrowser();
-
-        OutputStreamWriter writer = getOutputStream();
-        try {
-            BufferedReader bufferedReader = getInputStream();
-            try {
-                loopUrls(bufferedReader, writer, true, PERF_LOOPCOUNT);
-            } finally {
-                if (bufferedReader != null) {
-                    bufferedReader.close();
-                }
-            }
-        } catch (FileNotFoundException fnfe) {
-            Log.e(TAG, fnfe.getMessage(), fnfe);
-            fail("Test environment not setup correctly");
-        } finally {
-            if (writer != null) {
-                writer.close();
-            }
-        }
-    }
-
-    public void testStability() throws IOException, InterruptedException {
-        setUpBrowser();
-
-        BufferedReader bufferedReader = getInputStream();
-        try {
-            loopUrls(bufferedReader, null, true, STABILITY_LOOPCOUNT);
-        } catch (FileNotFoundException fnfe) {
-            Log.e(TAG, fnfe.getMessage(), fnfe);
-            fail("Test environment not setup correctly");
-        } finally {
-            if (bufferedReader != null) {
-                bufferedReader.close();
-            }
-        }
-    }
-
-    private void clearCacheUiThread(final WebView webView, final boolean includeDiskFiles) {
-        Runnable runner = new Runnable() {
-
-            @Override
-            public void run() {
-                webView.clearCache(includeDiskFiles);
-            }
-        };
-        getInstrumentation().runOnMainSync(runner);
-    }
-
-    private String getUrlUiThread(final WebView webView) {
-        WebViewUrlGetter urlGetter = new WebViewUrlGetter(webView);
-        getInstrumentation().runOnMainSync(urlGetter);
-        return urlGetter.getUrl();
-    }
-
-    private class WebViewUrlGetter implements Runnable {
-
-        private WebView mWebView;
-        private String mUrl;
-
-        public WebViewUrlGetter(WebView webView) {
-            mWebView = webView;
-        }
-
-        @Override
-        public void run() {
-                mUrl = null;
-                mUrl = mWebView.getUrl();
-        }
-
-        public String getUrl() {
-            if (mUrl != null) {
-                return mUrl;
-            } else
-                throw new IllegalStateException("url has not been fetched yet");
-        }
-    }
-}
diff --git a/tests/src/com/android/browser/TestWebViewClient.java b/tests/src/com/android/browser/TestWebViewClient.java
index 6ab40dd..7159a7e 100644
--- a/tests/src/com/android/browser/TestWebViewClient.java
+++ b/tests/src/com/android/browser/TestWebViewClient.java
@@ -20,12 +20,10 @@
 import android.net.http.SslError;
 import android.os.Message;
 import android.view.KeyEvent;
-import android.webkit.ClientCertRequestHandler;
 import android.webkit.HttpAuthHandler;
 import android.webkit.SslErrorHandler;
 import android.webkit.WebView;
 import android.webkit.WebViewClient;
-import android.webkit.WebViewClientClassicExt;
 
 /**
  *
@@ -34,7 +32,7 @@
  * Wraps around existing client so that specific methods can be overridden if needed.
  *
  */
-abstract class TestWebViewClient extends WebViewClientClassicExt {
+abstract class TestWebViewClient extends WebViewClient {
 
   private WebViewClient mWrappedClient;
 
@@ -104,17 +102,6 @@
 
   /** {@inheritDoc} */
   @Override
-  public void onReceivedClientCertRequest(WebView view, ClientCertRequestHandler handler,
-          String host_and_port) {
-    if (mWrappedClient instanceof WebViewClientClassicExt) {
-      ((WebViewClientClassicExt) mWrappedClient).onReceivedClientCertRequest(view, handler, host_and_port);
-    } else {
-      super.onReceivedClientCertRequest(view, handler, host_and_port);
-    }
-  }
-
-  /** {@inheritDoc} */
-  @Override
   public void onReceivedHttpAuthRequest(WebView view,
           HttpAuthHandler handler, String host, String realm) {
       mWrappedClient.onReceivedHttpAuthRequest(view, handler, host, realm);