OLD | NEW |
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.sync.notifier; | 5 package org.chromium.components.sync.notifier; |
6 | 6 |
7 /** | 7 /** |
8 * An injectable singleton that provides an invalidation client with an appropri
ate unique name. | 8 * An injectable singleton that provides an invalidation client with an appropri
ate unique name. |
9 * | 9 * |
10 * This singleton will always provide a somewhat reasonable name. With proper s
upport from outside | 10 * This singleton will always provide a somewhat reasonable name. With proper s
upport from outside |
11 * components, it will be able to provide a name that is consistent across resta
rts. | 11 * components, it will be able to provide a name that is consistent across resta
rts. |
12 */ | 12 */ |
13 public class InvalidationClientNameProvider { | 13 public class InvalidationClientNameProvider { |
14 private static final Object LOCK = new Object(); | 14 private static final Object LOCK = new Object(); |
15 | 15 |
(...skipping 26 matching lines...) Expand all Loading... |
42 mUniqueId = mGenerator.generateInvalidatorClientName(); | 42 mUniqueId = mGenerator.generateInvalidatorClientName(); |
43 } | 43 } |
44 return mUniqueId; | 44 return mUniqueId; |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 public void setPreferredClientNameGenerator(InvalidationClientNameGenerator
generator) { | 48 public void setPreferredClientNameGenerator(InvalidationClientNameGenerator
generator) { |
49 mGenerator = generator; | 49 mGenerator = generator; |
50 } | 50 } |
51 } | 51 } |
OLD | NEW |