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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/invalidation/UniqueIdInvalidationClientNameGenerator.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.invalidation; 5 package org.chromium.chrome.browser.invalidation;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 8
9 import org.chromium.chrome.browser.identity.UniqueIdentificationGenerator; 9 import org.chromium.chrome.browser.identity.UniqueIdentificationGenerator;
10 import org.chromium.chrome.browser.identity.UuidBasedUniqueIdentificationGenerat or; 10 import org.chromium.chrome.browser.identity.UuidBasedUniqueIdentificationGenerat or;
11 import org.chromium.sync.notifier.InvalidationClientNameGenerator; 11 import org.chromium.components.sync.notifier.InvalidationClientNameGenerator;
12 import org.chromium.sync.notifier.InvalidationClientNameProvider; 12 import org.chromium.components.sync.notifier.InvalidationClientNameProvider;
13 13
14 /** 14 /**
15 * An InvalidationClientNameGenerator that wraps an UniqueIdentificationGenerato r. 15 * An InvalidationClientNameGenerator that wraps an UniqueIdentificationGenerato r.
16 * 16 *
17 * If the right kind of UniqueIdentificationGenerator is provided, then this wil l produce IDs that 17 * If the right kind of UniqueIdentificationGenerator is provided, then this wil l produce IDs that
18 * are unique and consistent across restarts. 18 * are unique and consistent across restarts.
19 */ 19 */
20 public class UniqueIdInvalidationClientNameGenerator implements InvalidationClie ntNameGenerator { 20 public class UniqueIdInvalidationClientNameGenerator implements InvalidationClie ntNameGenerator {
21 // Pref key to use for UUID-based generator. 21 // Pref key to use for UUID-based generator.
22 private static final String INVALIDATIONS_UUID_PREF_KEY = "chromium.invalida tions.uuid"; 22 private static final String INVALIDATIONS_UUID_PREF_KEY = "chromium.invalida tions.uuid";
(...skipping 15 matching lines...) Expand all
38 38
39 UniqueIdInvalidationClientNameGenerator(UniqueIdentificationGenerator genera tor) { 39 UniqueIdInvalidationClientNameGenerator(UniqueIdentificationGenerator genera tor) {
40 mGenerator = generator; 40 mGenerator = generator;
41 } 41 }
42 42
43 @Override 43 @Override
44 public byte[] generateInvalidatorClientName() { 44 public byte[] generateInvalidatorClientName() {
45 return mGenerator.getUniqueId(null).getBytes(); 45 return mGenerator.getUniqueId(null).getBytes();
46 } 46 }
47 } 47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698