- Introduce a new BatchingUploader class to handle storing records and keep track of batches/payloads
- Refactor upload runnable and upload delegate into their own classes
- Introduce Last-Modified and X-I-U-S handling into non-batching mode
MozReview-Commit-ID: 3JLExwQvYzM
--HG--
extra : rebase_source : 4a6a2db595fe72473b033acd4f3180fa799319d4
This removes the unnecessary setting of c-basic-offset from all
python-mode files.
This was automatically generated using
perl -pi -e 's/; *c-basic-offset: *[0-9]+//'
... on the affected files.
The bulk of these files are moz.build files but there a few others as
well.
MozReview-Commit-ID: 2pPf3DEiZqx
--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
This commit adds the GzipNonChunkedCompressingEntity which is necessary because
the telemetry servers don't support chunked uploading, which the built in
GzipCompressingEntity does.
I tested this on my local device and logs for successful uploads were sent for
both the testing gzip server as well as the official telemetry server. My data
correctly appears on the former and I did not check the latter.
MozReview-Commit-ID: 4bCNiRYyqFD
--HG--
extra : rebase_source : 28f877258fdf25a098bc5f1634c060b3fd53fe39
See
https://android-developers.blogspot.com/2013/08/some-securerandom-thoughts.html
for a thorough discussion.
It's very expensive (at least 200ms on modern devices) to do this in
Application.onCreate, so we'll do this just before generating DSA keys.
In exchange, we accept some risk that we'll introduce the same issue
again. As we lint more aggressively in automation, this risk will
decrease.
Google licenses the fixes file very permissively. I have added some
serialization IDs to prevent certain compile warnings.
--HG--
extra : commitid : 2GRwurnHhvE
extra : rebase_source : 8d28b7d6541579d5f51f5173f7fe9a16ca39a982
extra : amend_source : ae37a4afa0754775fd0ccf94dc3718081dd37eb3
A few notes: the test is live, so I've marked it @Ignore, so that it
doesn't run during |mach gradle test|. There's some value in mocking
the service endpoint, but this is how I verify that the server works,
so it has more value right now as a live test than a mocked test. In
the future, that probably won't be true.
There are issues running the test locally because Robolectric doesn't
provide all the cipher suites we use in GlobalConstants: in
particular, the GCM suites aren't supported. This may improve as
Robolectric matures, or we may add a work-around in the code (like at
http://androidxref.com/4.4.4_r1/xref/libcore/support/src/test/java/libcore/java/security/StandardNames.java#68),
or we may add a test-specific flag. For now, I'm not going to address
it directly.
Finally, I put the code in mobile/android/services, simply because the
less that goes into base, the better our build times will be.
--HG--
extra : commitid : Gw8uCqVViMC
extra : rebase_source : 7d35b78cb776fbd3892a2a95190a61846e0a3291
extra : amend_source : dfa8168eaca0a44b05a71fe6fdf4952964460d79
The two stages are EnsureClusterURLStage (the FxA + Sync cluster URL
is determined directly from the token provided by the token server),
and MigrationSentinelSyncStage. This allowed to merge the two
{Base}GlobalSessionCallback classes together, as well as removing the
specializing FxAcccountGlobalSession.
--HG--
extra : commitid : EDoW9AAGE0M
extra : rebase_source : 00fc286b0e5789790b5dc7afdc5532857a08bbfa
The web based Activity sub-classes never used the other intent extras,
and in fact, filter them out immediately; so it doesn't hurt to clean
this all up.
--HG--
extra : commitid : KggZGk67ElE
extra : rebase_source : 40ecabce597eb0bb2c6326a14c2153eb969e06ee
extra : histedit_source : 02836f27b4c99c1d294b46c0c47a61f2f59aef0b
Internal intents are forwarded with extras. External intents submit
with only an action.
--HG--
extra : commitid : Flgbl9HsEsx
extra : rebase_source : cb59022892eb2932f90817b7ad98ef71693735f2
extra : amend_source : 23c8399e06415e7518a5b575d59d6194a67974a2
The profile JSON is stored in the Account bundle. There's no need to
bump the bundle version, since missing (i.e., null) profile JSON is
legal.
This introduces and uses a general-purpose PicassoPreferenceIcon
Picasso Target that, on API 11+ devices, dynamically loads a
preference icon.
--HG--
extra : commitid : 5eCDv0G75qy
extra : rebase_source : 4380e6ea0d5992ca212de0bf95c6d471817f2f35
========
cd7edfa0b5
Author: Nick Alexander <nalexander@mozilla.com>
Bug 1140812 - Part 3: React to Backoff and Retry-After headers.
========
8581f5a572
Author: Nick Alexander <nalexander@mozilla.com>
Date: Fri Mar 27 15:30:33 2015 -0700
Bug 1140812 - Part 2: Include request in HTTP response observation callbacks.
This allows to only handle responses from certain hosts.
========
05b50325db
Author: Nick Alexander <nalexander@mozilla.com>
Date: Fri Mar 27 14:47:38 2015 -0700
Bug 1140812 - Part 1: Generalize from one to many HTTP response observers.
CopyOnWriteArrayList is a reasonable choice here: we have few writes but
many iterations. See
http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CopyOnWriteArrayList.html
========
5950219343
Author: Nick Alexander <nalexander@mozilla.com>
Date: Fri Mar 27 16:04:07 2015 -0700
Bug 1140812 - Pre: Modernize backoffInSeconds.
Sync uses X-Backoff; newer services, including Reading List, use Backoff.
========
9b406122ef
Author: Nick Alexander <nalexander@mozilla.com>
Bug 1142596 - Post: Use production OAuth and Reading List endpoints.
========
9e5368b4aa
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 23:00:34 2015 -0700
Bug 1142596 - Part 4: Make ReadingListSyncAdapter use oauth tokens produced and cached by the authenticator.
========
fbef93698d
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:49:52 2015 -0700
Bug 1142596 - Part 3: Implement getAuthToken with token types of the form oauth::scope.
Be aware that there are two levels of token invalidation relevant here.
The first level is when a consumer uses an oauth token and gets a 401;
in this case, the consumer *must* call Android's own
invalidateAuthToken. The second level is when the oauth client itself
gets a 401 trying to fetch an oauth token; in this case, the internal
state of the Firefox Account needs to be pushed back.
========
e4e2247b4e
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:43:26 2015 -0700
Bug 1142596 - Part 2: Extract login state machine delegate encapsulating expirations.
========
f1f716cc88
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:14:47 2015 -0700
Bug 1142596 - Part 1: Surface Reading List authentication errors.
========
5833cbbf71
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:01:46 2015 -0700
Bug 1142596 - Pre: Add note about deleting cached oauth tokens.
Deleting cached oauth tokens is tracked by Bug 1147245.
========
b0165a6c14
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 23:06:49 2015 -0700
Bug 1142596 - Pre: Trim imports.
========
9b406122ef
Author: Nick Alexander <nalexander@mozilla.com>
Date: Thu Mar 26 14:13:58 2015 -0700
Bug 1142596 - Post: Use production OAuth and Reading List endpoints.
========
9e5368b4aa
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 23:00:34 2015 -0700
Bug 1142596 - Part 4: Make ReadingListSyncAdapter use oauth tokens produced and cached by the authenticator.
========
fbef93698d
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:49:52 2015 -0700
Bug 1142596 - Part 3: Implement getAuthToken with token types of the form oauth::scope.
Be aware that there are two levels of token invalidation relevant here.
The first level is when a consumer uses an oauth token and gets a 401;
in this case, the consumer *must* call Android's own
invalidateAuthToken. The second level is when the oauth client itself
gets a 401 trying to fetch an oauth token; in this case, the internal
state of the Firefox Account needs to be pushed back.
========
e4e2247b4e
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:43:26 2015 -0700
Bug 1142596 - Part 2: Extract login state machine delegate encapsulating expirations.
========
f1f716cc88
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:14:47 2015 -0700
Bug 1142596 - Part 1: Surface Reading List authentication errors.
========
5833cbbf71
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 22:01:46 2015 -0700
Bug 1142596 - Pre: Add note about deleting cached oauth tokens.
Deleting cached oauth tokens is tracked by Bug 1147245.
========
b0165a6c14
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Mar 24 23:06:49 2015 -0700
Bug 1142596 - Pre: Trim imports.
The oauth client exchanges Firefox Account assertions for oauth token
grants. The client_id is assumed to have the "canGrant" capability on
the oauth endpoint.
========
d1a25c8233
Author: Nick Alexander <nalexander@mozilla.com>
Bug 1117829 - Part 3: Add FxA oauth and profile clients.
========
6c52ce9b53
Author: Nick Alexander <nalexander@mozilla.com>
Date: Mon Aug 18 13:53:56 2014 -0700
Bug 1117829 - Part 2: Support remote verifier v1 and v2.
========
679e972d2c
Author: Nick Alexander <nalexander@mozilla.com>
Date: Mon Aug 18 11:52:45 2014 -0700
Bug 1117829 - Part 1: Generalize bearer token auth header providers.
========
b55a14fe88
Author: Nick Alexander <nalexander@mozilla.com>
Date: Mon Aug 18 13:54:46 2014 -0700
Bug 1117829 - Pre: Add static methods for cross-class testing.
========
5576662dd3
Author: Nick Alexander <nalexander@mozilla.com>
Date: Mon Aug 18 11:42:45 2014 -0700
Bug 1117829 - Pre: Fix debug printing of JWT structures.