Commit 4c370147 authored by Tanmoy Mollik's avatar Tanmoy Mollik Committed by Commit Bot

Remove pre-unity classes

These classes are no longer used post-unity.

Bug: 978908
Change-Id: I96657e3594feea4fea032a0c4c73216e21c1a0e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1724673Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682698}
parent 75126128
...@@ -1257,9 +1257,7 @@ chrome_java_sources = [ ...@@ -1257,9 +1257,7 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/preferences/sync/SignInPreference.java", "java/src/org/chromium/chrome/browser/preferences/sync/SignInPreference.java",
"java/src/org/chromium/chrome/browser/preferences/sync/SyncAndServicesPreferences.java", "java/src/org/chromium/chrome/browser/preferences/sync/SyncAndServicesPreferences.java",
"java/src/org/chromium/chrome/browser/preferences/sync/SyncErrorCardPreference.java", "java/src/org/chromium/chrome/browser/preferences/sync/SyncErrorCardPreference.java",
"java/src/org/chromium/chrome/browser/preferences/sync/SyncPreference.java",
"java/src/org/chromium/chrome/browser/preferences/sync/SyncPreferenceUtils.java", "java/src/org/chromium/chrome/browser/preferences/sync/SyncPreferenceUtils.java",
"java/src/org/chromium/chrome/browser/preferences/sync/SyncedAccountPreference.java",
"java/src/org/chromium/chrome/browser/preferences/TextAndButtonPreference.java", "java/src/org/chromium/chrome/browser/preferences/TextAndButtonPreference.java",
"java/src/org/chromium/chrome/browser/preferences/TextMessagePreference.java", "java/src/org/chromium/chrome/browser/preferences/TextMessagePreference.java",
"java/src/org/chromium/chrome/browser/preferences/TextScalePreference.java", "java/src/org/chromium/chrome/browser/preferences/TextScalePreference.java",
...@@ -1479,7 +1477,6 @@ chrome_java_sources = [ ...@@ -1479,7 +1477,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/survey/SurveyController.java", "java/src/org/chromium/chrome/browser/survey/SurveyController.java",
"java/src/org/chromium/chrome/browser/sync/GoogleServiceAuthError.java", "java/src/org/chromium/chrome/browser/sync/GoogleServiceAuthError.java",
"java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java", "java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java",
"java/src/org/chromium/chrome/browser/sync/SyncAccountSwitcher.java",
"java/src/org/chromium/chrome/browser/sync/SyncController.java", "java/src/org/chromium/chrome/browser/sync/SyncController.java",
"java/src/org/chromium/chrome/browser/sync/SyncNotificationController.java", "java/src/org/chromium/chrome/browser/sync/SyncNotificationController.java",
"java/src/org/chromium/chrome/browser/sync/SyncUserDataWiper.java", "java/src/org/chromium/chrome/browser/sync/SyncUserDataWiper.java",
...@@ -1487,7 +1484,6 @@ chrome_java_sources = [ ...@@ -1487,7 +1484,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/sync/ui/PassphraseCreationDialogFragment.java", "java/src/org/chromium/chrome/browser/sync/ui/PassphraseCreationDialogFragment.java",
"java/src/org/chromium/chrome/browser/sync/ui/PassphraseDialogFragment.java", "java/src/org/chromium/chrome/browser/sync/ui/PassphraseDialogFragment.java",
"java/src/org/chromium/chrome/browser/sync/ui/PassphraseTypeDialogFragment.java", "java/src/org/chromium/chrome/browser/sync/ui/PassphraseTypeDialogFragment.java",
"java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java",
"java/src/org/chromium/chrome/browser/tab/AuthenticatorNavigationInterceptor.java", "java/src/org/chromium/chrome/browser/tab/AuthenticatorNavigationInterceptor.java",
"java/src/org/chromium/chrome/browser/tab/BrowserControlsVisibilityDelegate.java", "java/src/org/chromium/chrome/browser/tab/BrowserControlsVisibilityDelegate.java",
"java/src/org/chromium/chrome/browser/tab/ChildBackgroundTabShowObserver.java", "java/src/org/chromium/chrome/browser/tab/ChildBackgroundTabShowObserver.java",
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2015 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<org.chromium.chrome.browser.preferences.sync.SyncErrorCardPreference
android:key="sync_error_card"
android:icon="@drawable/sync_error"
app:iconTint="@color/default_red"
android:title="@string/sync_error_card_title"/>
<org.chromium.chrome.browser.preferences.ChromeSwitchPreference
android:key="sync_switch"
android:title="@string/sign_in_sync"
android:summary="@string/sync_description" />
<org.chromium.chrome.browser.preferences.sync.SyncedAccountPreference
android:key="synced_account" />
<PreferenceCategory
android:key="sync_data_types"
android:title="@string/sync_data_types">
<org.chromium.chrome.browser.preferences.ChromeSwitchPreference
android:persistent="false"
android:key="sync_everything"
android:title="@string/sync_everything_pref"/>
<org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference
android:persistent="false"
android:key="sync_autofill"
android:title="@string/sync_autofill"/>
<org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference
android:persistent="false"
android:key="sync_bookmarks"
android:title="@string/sync_bookmarks"/>
<org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference
android:persistent="false"
android:key="sync_omnibox"
android:title="@string/sync_history"/>
<org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference
android:persistent="false"
android:key="sync_passwords"
android:title="@string/sync_passwords"/>
<org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference
android:persistent="false"
android:key="sync_recent_tabs"
android:title="@string/sync_recent_tabs"/>
<org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference
android:persistent="false"
android:key="sync_settings"
android:title="@string/sync_settings"/>
<org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference
android:persistent="false"
android:key="payments_integration"
android:title="@string/payments_integration_legacy"/>
</PreferenceCategory>
<Preference
android:key="encryption"
android:title="@string/sync_encryption" />
<Preference
android:key="sync_manage_data"
android:title="@string/sync_manage_data" />
</PreferenceScreen>
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.preferences.sync;
import android.content.Context;
import android.support.v7.preference.Preference;
import android.util.AttributeSet;
import org.chromium.chrome.R;
import org.chromium.ui.UiUtils;
/**
* A preference that displays the current sync account and status (enabled, error, needs passphrase,
* etc).
*/
public class SyncPreference extends Preference {
public SyncPreference(Context context, AttributeSet attrs) {
super(context, attrs);
updateSyncSummaryAndIcon();
}
/**
* Updates the summary and icon for this preference to reflect the current state of syncing.
*/
public void updateSyncSummaryAndIcon() {
setSummary(SyncPreferenceUtils.getSyncStatusSummary(getContext()));
if (SyncPreferenceUtils.showSyncErrorIcon(getContext())) {
setIcon(UiUtils.getTintedDrawable(
getContext(), R.drawable.sync_error, R.color.default_red));
} else {
setIcon(UiUtils.getTintedDrawable(getContext(), R.drawable.permission_background_sync,
R.color.default_icon_color_blue));
}
}
}
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.preferences.sync;
import android.accounts.Account;
import android.content.Context;
import android.support.v7.preference.ListPreference;
import android.text.TextUtils;
import android.util.AttributeSet;
import org.chromium.chrome.R;
import org.chromium.components.signin.AccountManagerFacade;
import org.chromium.components.signin.ChromeSigninController;
import org.chromium.components.sync.AndroidSyncSettings;
import java.util.List;
/**
* A preference that displays the account currently being synced and allows the user to choose a new
* account to use for syncing. The values used are the account names.
*/
public class SyncedAccountPreference extends ListPreference {
private static final String TAG = "SyncedAccountPreference";
/**
* Constructor for inflating from XML
*/
public SyncedAccountPreference(Context context, AttributeSet attrs) {
super(context, attrs);
setTitle(context.getResources().getString(R.string.sync_to_account_header));
updateAccountsList();
}
/**
* Updates the list of accounts to those currently signed in and sets the display to the
* current sync account.
*/
public void update() {
updateAccountsList();
}
private void updateAccountsList() {
boolean syncEnabled = AndroidSyncSettings.get().isSyncEnabled();
if (!syncEnabled) {
setEnabled(false);
// Don't return at this point, we still want the preference to display the currently
// signed in account
}
List<Account> accounts = AccountManagerFacade.get().tryGetGoogleAccounts();
String[] accountNames = new String[accounts.size()];
String[] accountValues = new String[accounts.size()];
String signedInAccountName = ChromeSigninController.get().getSignedInAccountName();
String signedInSettingsKey = "";
for (int i = 0; i < accounts.size(); ++i) {
Account account = accounts.get(i);
accountNames[i] = account.name;
accountValues[i] = account.name;
boolean isPrimaryAccount = TextUtils.equals(account.name, signedInAccountName);
if (isPrimaryAccount) {
signedInSettingsKey = accountValues[i];
}
}
setEntries(accountNames);
setEntryValues(accountValues);
setValue(signedInSettingsKey);
setSummary(signedInAccountName);
}
}
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.sync;
import android.support.v4.app.FragmentActivity;
import android.support.v7.preference.Preference;
import android.text.TextUtils;
import org.chromium.chrome.browser.preferences.sync.SyncedAccountPreference;
import org.chromium.chrome.browser.signin.ConfirmImportSyncDataDialog;
import org.chromium.chrome.browser.signin.ConfirmImportSyncDataDialog.ImportSyncType;
import org.chromium.chrome.browser.signin.ConfirmSyncDataStateMachine;
import org.chromium.chrome.browser.signin.IdentityServicesProvider;
import org.chromium.chrome.browser.signin.SigninManager;
import org.chromium.chrome.browser.signin.SigninManager.SignInCallback;
import org.chromium.chrome.browser.signin.SignoutReason;
/**
* A class that encapsulates the control flow of listeners and callbacks when switching sync
* accounts.
*
* Control flows through the method in this order:
* {@link OnPreferenceChangeListener#onPreferenceChange}
* {@link ConfirmImportSyncDataDialog.Listener#onConfirm}
* {@link SignInCallback#onSignInComplete}
*/
public class SyncAccountSwitcher implements Preference.OnPreferenceChangeListener,
ConfirmImportSyncDataDialog.Listener, SignInCallback {
private static final String TAG = "SyncAccountSwitcher";
private final SyncedAccountPreference mSyncedAccountPreference;
private final FragmentActivity mActivity;
private String mNewAccountName;
/**
* Sets up a SyncAccountSwitcher to be ready to accept callbacks.
* @param activity Activity used to get the context for signin and get the fragmentManager
* for the data sync fragment.
* @param syncedAccountPreference The preference to update once signin has been completed.
*/
public SyncAccountSwitcher(
FragmentActivity activity, SyncedAccountPreference syncedAccountPreference) {
mActivity = activity;
mSyncedAccountPreference = syncedAccountPreference;
}
@Override
public boolean onPreferenceChange(Preference p, Object newValue) {
if (newValue == null) return false;
mNewAccountName = (String) newValue;
String currentAccount = mSyncedAccountPreference.getValue();
if (TextUtils.equals(mNewAccountName, currentAccount)) return false;
new ConfirmSyncDataStateMachine(mActivity, mActivity.getSupportFragmentManager(),
ImportSyncType.SWITCHING_SYNC_ACCOUNTS, currentAccount, mNewAccountName, this);
// Don't update the selected account in the preference. It will be updated by
// the call to mSyncAccountListPreference.update() if everything succeeds.
return false;
}
@Override
public void onConfirm(final boolean wipeData) {
assert mNewAccountName != null;
SigninManager signinManager = IdentityServicesProvider.getSigninManager();
// Sign out first to ensure we don't wipe the data when sync is still on.
// TODO(https://crbug.com/873116): Pass the correct reason for the signout.
signinManager.signOutPromise(SignoutReason.USER_CLICKED_SIGNOUT_SETTINGS)
.then((Void argument) -> {
// Once signed out, clear the last signed in user and wipe data if needed.
signinManager.clearLastSignedInUser();
return SyncUserDataWiper.wipeSyncUserDataIfRequired(wipeData);
})
.then((Void argument) -> {
// Once the data has been wiped (if needed), sign in to the next account.
signinManager.signIn(
mNewAccountName, mActivity, SyncAccountSwitcher.this);
});
}
@Override
public void onCancel() {
// The user aborted the 'merge data' dialog, there is nothing to do.
}
@Override
public void onSignInComplete() {
// Update the Preference so it displays the correct account name.
mSyncedAccountPreference.update();
}
@Override
public void onSignInAborted() {
// If the user aborted signin, there is nothing to do.
}
}
...@@ -1654,15 +1654,6 @@ Your Google account may have other forms of browsing history like searches and a ...@@ -1654,15 +1654,6 @@ Your Google account may have other forms of browsing history like searches and a
<message name="IDS_SIGN_IN_SYNC" desc="Sync preference title in signed-in prefs and prefix for notification related to sync [CHAR-LIMIT=32]"> <message name="IDS_SIGN_IN_SYNC" desc="Sync preference title in signed-in prefs and prefix for notification related to sync [CHAR-LIMIT=32]">
Sync Sync
</message> </message>
<message name="IDS_SYNC_DESCRIPTION" desc="Describes the purpose of syncing. This will be displayed on the sync on/off toggle">
Get your bookmarks, history, passwords, and other settings on all your devices
</message>
<message name="IDS_SYNC_TO_ACCOUNT_HEADER" desc="Header title for selecting the account to sync to [CHAR-LIMIT=32]">
Sync to
</message>
<message name="IDS_SYNC_DATA_TYPES" desc="Preference category name for customization of synced data types. [CHAR-LIMT=32]">
Data types
</message>
<message name="IDS_SYNC_EVERYTHING_PREF" desc="Title for preference which enables sync'ing of all data types. [CHAR-LIMT=32]"> <message name="IDS_SYNC_EVERYTHING_PREF" desc="Title for preference which enables sync'ing of all data types. [CHAR-LIMT=32]">
Sync everything Sync everything
</message> </message>
...@@ -1684,9 +1675,6 @@ Your Google account may have other forms of browsing history like searches and a ...@@ -1684,9 +1675,6 @@ Your Google account may have other forms of browsing history like searches and a
<message name="IDS_SYNC_SETTINGS" desc="Title for preference which enables sync'ing of settings. [CHAR-LIMT=32]"> <message name="IDS_SYNC_SETTINGS" desc="Title for preference which enables sync'ing of settings. [CHAR-LIMT=32]">
Settings Settings
</message> </message>
<message name="IDS_PAYMENTS_INTEGRATION_LEGACY" desc="Title for preference which enables import of Google Pay data for Autofill. 'Google Pay' should not be translated as it is the product name.">
Cards and addresses using Google Pay
</message>
<message name="IDS_SYNC_PAYMENTS_INTEGRATION" desc="Title for preference which enables import of Google Pay data for Autofill. 'Google Pay' should not be translated as it is the product name."> <message name="IDS_SYNC_PAYMENTS_INTEGRATION" desc="Title for preference which enables import of Google Pay data for Autofill. 'Google Pay' should not be translated as it is the product name.">
Credit cards and addresses using Google Pay Credit cards and addresses using Google Pay
</message> </message>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment