Chromium Code Reviews| Index: components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedServiceLauncher.java |
| diff --git a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedServiceLauncher.java b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedServiceLauncher.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8cf05f59fac53c21312e589b0ae63b0ea794a7b2 |
| --- /dev/null |
| +++ b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedServiceLauncher.java |
| @@ -0,0 +1,28 @@ |
| +// 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. |
| + |
| +package org.chromium.components.variations.firstrun; |
| + |
| +import android.content.BroadcastReceiver; |
| +import android.content.Context; |
| +import android.content.Intent; |
| + |
| +/** |
| + * This receiver is notified when a user goes through the Setup Wizard and acknowledges |
| + * the Chrome ToS and after that we start a variations service to fetch variations seed |
| + * before the actual first Chrome launch. |
| + * |
| + * TODO(agulenko): Implement working with another broadcast (e.g. connectivity change) |
| + * since chrome.TOS_ACKED won't be broadcasted in Android N. |
| + */ |
| +public class VariationsSeedServiceLauncher extends BroadcastReceiver { |
| + private static final String TAG = "VariationsSeedServiceLauncher"; |
| + |
| + @Override |
| + public void onReceive(Context context, Intent intent) { |
| + // Start of service to fetch variations seed from the server to use it on Chrome first run |
| + Intent serviceIntent = new Intent(context, VariationsSeedService.class); |
|
newt (away)
2015/11/06 18:27:15
We should check whether we've already downloaded t
Alexander Agulenko
2015/11/06 19:54:38
Acknowledged.
Since we currently use chrome.TOS_A
|
| + context.startService(serviceIntent); |
| + } |
| +} |