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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/sync/SyncController.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 4
5 package org.chromium.chrome.browser.sync; 5 package org.chromium.chrome.browser.sync;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 9
10 import org.chromium.base.ActivityState; 10 import org.chromium.base.ActivityState;
11 import org.chromium.base.ApplicationStatus; 11 import org.chromium.base.ApplicationStatus;
12 import org.chromium.base.ApplicationStatus.ActivityStateListener; 12 import org.chromium.base.ApplicationStatus.ActivityStateListener;
13 import org.chromium.base.Log; 13 import org.chromium.base.Log;
14 import org.chromium.base.ThreadUtils; 14 import org.chromium.base.ThreadUtils;
15 import org.chromium.base.VisibleForTesting; 15 import org.chromium.base.VisibleForTesting;
16 import org.chromium.base.metrics.RecordHistogram; 16 import org.chromium.base.metrics.RecordHistogram;
17 import org.chromium.chrome.browser.ChromeApplication; 17 import org.chromium.chrome.browser.ChromeApplication;
18 import org.chromium.chrome.browser.identity.UniqueIdentificationGenerator; 18 import org.chromium.chrome.browser.identity.UniqueIdentificationGenerator;
19 import org.chromium.chrome.browser.identity.UniqueIdentificationGeneratorFactory ; 19 import org.chromium.chrome.browser.identity.UniqueIdentificationGeneratorFactory ;
20 import org.chromium.chrome.browser.invalidation.InvalidationController; 20 import org.chromium.chrome.browser.invalidation.InvalidationController;
21 import org.chromium.chrome.browser.signin.AccountManagementFragment; 21 import org.chromium.chrome.browser.signin.AccountManagementFragment;
22 import org.chromium.chrome.browser.signin.SigninManager; 22 import org.chromium.chrome.browser.signin.SigninManager;
23 import org.chromium.chrome.browser.sync.ui.PassphraseActivity; 23 import org.chromium.chrome.browser.sync.ui.PassphraseActivity;
24 import org.chromium.sync.AndroidSyncSettings; 24 import org.chromium.components.sync.AndroidSyncSettings;
25 import org.chromium.sync.ModelType; 25 import org.chromium.components.sync.ModelType;
26 import org.chromium.sync.PassphraseType; 26 import org.chromium.components.sync.PassphraseType;
27 import org.chromium.sync.StopSource; 27 import org.chromium.components.sync.StopSource;
28 import org.chromium.sync.signin.ChromeSigninController; 28 import org.chromium.components.sync.signin.ChromeSigninController;
29 29
30 import javax.annotation.Nullable; 30 import javax.annotation.Nullable;
31 31
32 /** 32 /**
33 * SyncController handles the coordination of sync state between the invalidatio n controller, 33 * SyncController handles the coordination of sync state between the invalidatio n controller,
34 * the Android sync settings, and the native sync code. 34 * the Android sync settings, and the native sync code.
35 * 35 *
36 * It also handles initialization of some pieces of sync state on startup. 36 * It also handles initialization of some pieces of sync state on startup.
37 * 37 *
38 * Sync state can be changed from four places: 38 * Sync state can be changed from four places:
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 UniqueIdentificationGeneratorFactory.getInstance(GENERATOR_ID); 225 UniqueIdentificationGeneratorFactory.getInstance(GENERATOR_ID);
226 String uniqueTag = generator.getUniqueId(null); 226 String uniqueTag = generator.getUniqueId(null);
227 if (uniqueTag.isEmpty()) { 227 if (uniqueTag.isEmpty()) {
228 Log.e(TAG, "Unable to get unique tag for sync. " 228 Log.e(TAG, "Unable to get unique tag for sync. "
229 + "This may lead to unexpected tab sync behavior."); 229 + "This may lead to unexpected tab sync behavior.");
230 return; 230 return;
231 } 231 }
232 mProfileSyncService.setSessionsId(SESSION_TAG_PREFIX + uniqueTag); 232 mProfileSyncService.setSessionsId(SESSION_TAG_PREFIX + uniqueTag);
233 } 233 }
234 } 234 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698