Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncPreference.java

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 package org.chromium.chrome.browser.preferences; 4 package org.chromium.chrome.browser.preferences;
5 5
6 import android.accounts.Account; 6 import android.accounts.Account;
7 import android.content.Context; 7 import android.content.Context;
8 import android.content.res.Resources; 8 import android.content.res.Resources;
9 import android.graphics.PorterDuff; 9 import android.graphics.PorterDuff;
10 import android.graphics.drawable.Drawable; 10 import android.graphics.drawable.Drawable;
11 import android.preference.Preference; 11 import android.preference.Preference;
12 import android.util.AttributeSet; 12 import android.util.AttributeSet;
13 13
14 import org.chromium.base.ApiCompatibilityUtils; 14 import org.chromium.base.ApiCompatibilityUtils;
15 import org.chromium.chrome.R; 15 import org.chromium.chrome.R;
16 import org.chromium.chrome.browser.childaccounts.ChildAccountService; 16 import org.chromium.chrome.browser.childaccounts.ChildAccountService;
17 import org.chromium.chrome.browser.sync.GoogleServiceAuthError; 17 import org.chromium.chrome.browser.sync.GoogleServiceAuthError;
18 import org.chromium.chrome.browser.sync.ProfileSyncService; 18 import org.chromium.chrome.browser.sync.ProfileSyncService;
19 import org.chromium.sync.AndroidSyncSettings; 19 import org.chromium.components.sync.AndroidSyncSettings;
20 import org.chromium.sync.signin.ChromeSigninController; 20 import org.chromium.components.sync.signin.ChromeSigninController;
21 21
22 /** 22 /**
23 * A preference that displays the current sync account and status (enabled, erro r, needs passphrase, 23 * A preference that displays the current sync account and status (enabled, erro r, needs passphrase,
24 * etc). 24 * etc).
25 */ 25 */
26 public class SyncPreference extends Preference { 26 public class SyncPreference extends Preference {
27 public SyncPreference(Context context, AttributeSet attrs) { 27 public SyncPreference(Context context, AttributeSet attrs) {
28 super(context, attrs); 28 super(context, attrs);
29 updateSyncSummaryAndIcon(); 29 updateSyncSummaryAndIcon();
30 } 30 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 Account account = ChromeSigninController.get(context).getSignedInUse r(); 119 Account account = ChromeSigninController.get(context).getSignedInUse r();
120 return String.format( 120 return String.format(
121 context.getString(R.string.account_management_sync_summary), account.name); 121 context.getString(R.string.account_management_sync_summary), account.name);
122 } 122 }
123 123
124 return context.getString(R.string.sync_is_disabled); 124 return context.getString(R.string.sync_is_disabled);
125 } 125 }
126 } 126 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698