Chromium Code Reviews| 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 c752d884b1fb67c05c0648f2f4bd1d2de2d90f26..b1e4ed18a903eeb40bc5a5cfe357320b606123b6 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 |
| @@ -48,7 +48,7 @@ public class VariationsSeedService extends IntentService { |
| connection.setConnectTimeout(REQUEST_TIMEOUT); |
| connection.setDoInput(true); |
| // TODO(agulenko): add gzip compression support. |
| - // connection.setRequestProperty("A-IM", "gzip"); |
| + connection.setRequestProperty("A-IM", "gzip"); |
| connection.connect(); |
| int responseCode = connection.getResponseCode(); |
| if (responseCode != HttpURLConnection.HTTP_OK) { |
| @@ -60,8 +60,11 @@ public class VariationsSeedService extends IntentService { |
| byte[] rawSeed = getRawSeed(connection); |
| String signature = connection.getHeaderField("X-Seed-Signature"); |
| String country = connection.getHeaderField("X-Country"); |
| + String date = connection.getHeaderField("Date"); |
| + String compression = connection.getHeaderField("IM"); |
| + boolean isGzipCompressed = (compression.indexOf("gzip") != -1); |
|
Alexei Svitkine (slow)
2015/11/12 16:26:55
This logic doesn't match the C++ side.
You want t
Alexander Agulenko
2015/11/12 20:07:41
Done.
|
| VariationsSeedBridge.setVariationsFirstRunSeed( |
| - getApplicationContext(), rawSeed, signature, country); |
| + getApplicationContext(), rawSeed, signature, country, date, isGzipCompressed); |
| return true; |
| } catch (IOException e) { |
| Log.w(TAG, "IOException fetching first run seed: ", e); |