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

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

Issue 1447823003: Revert of Implemented clearing Java prefs after pulling variations first run seed from Java to C++ side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/VariationsSeedService.java
diff --git a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedService.java b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedService.java
index d1efb22473b81c502b7a9ef64190b6a3c59cbd33..c752d884b1fb67c05c0648f2f4bd1d2de2d90f26 100644
--- a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedService.java
+++ b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedService.java
@@ -27,36 +27,17 @@
private static final int READ_TIMEOUT = 10000; // time in ms
private static final int REQUEST_TIMEOUT = 15000; // time in ms
- // Static variable that indicates a status of the variations seed fetch. If one request is in
- // progress, we do not start another fetch.
- private static boolean sFetchInProgress = false;
-
public VariationsSeedService() {
super(TAG);
}
@Override
public void onHandleIntent(Intent intent) {
- // Check if any variations seed fetch is in progress, or the seed has been already fetched,
- // or seed has been successfully stored on the C++ side.
- if (sFetchInProgress || VariationsSeedBridge.hasJavaPref(getApplicationContext())
- || VariationsSeedBridge.hasNativePref(getApplicationContext())) {
- return;
- }
- setFetchInProgressFlagValue(true);
try {
downloadContent(new URL(VARIATIONS_SERVER_URL));
} catch (MalformedURLException e) {
Log.w(TAG, "Variations server URL is malformed.", e);
- } finally {
- setFetchInProgressFlagValue(false);
}
- }
-
- // Separate function is needed to avoid FINDBUGS build error (assigning value to static variable
- // from non-static onHandleIntent() method).
- private static void setFetchInProgressFlagValue(boolean value) {
- sFetchInProgress = value;
}
private boolean downloadContent(URL variationsServerUrl) {

Powered by Google App Engine
This is Rietveld 408576698