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

Unified Diff: components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedServiceLauncher.java

Issue 1417733008: Java code for fetching variations first run seed after receiving chrome.TOS_ACKED broadcast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unnecessary exception throw declaration Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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..69f04c8a0b42e7b186311dd6fd7cf2beb6a75ed5
--- /dev/null
+++ b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedServiceLauncher.java
@@ -0,0 +1,27 @@
+// 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).
+ */
+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);
+ context.startService(serviceIntent);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698