| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it easier to add type specific tests and cleans up a lot
of code as a factory implementation is not longer needed for
shared memory.
BUG=538325
Review URL: https://codereview.chromium.org/1389133002
Cr-Commit-Position: refs/heads/master@{#352930}
|
|
|
|
|
|
|
|
|
|
|
| |
whenever this element has a selection but only when the focus of the selection is on that element.
BASED_ON:1383373002
R=aboxhall@chromium.org, dmazzoni@chromium.org
Review URL: https://codereview.chromium.org/1376683007
Cr-Commit-Position: refs/heads/master@{#352922}
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RequestNewOutputSurface() was previously unreached, because
SetLayerTreeHostClientReady() was never called. Just remove
the dead code and make it official that this does not create
an OutputSurface.
BUG=540026
Review URL: https://codereview.chromium.org/1395633002
Cr-Commit-Position: refs/heads/master@{#352920}
|
|
|
|
|
|
|
|
| |
BUG=angleproject:1007
Review URL: https://codereview.chromium.org/1396443003
Cr-Commit-Position: refs/heads/master@{#352918}
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some projects had included their own swithces header from chrome_switches.h for convenience. This is wasteful and causes problems for dependency management since these switch values are actually defined in another module that may or may not be linked into the code including it.
This removes the includes except for content_switches, and makes the files that depended on these switches include the sub-switch file directly.
BUG=
Review URL: https://codereview.chromium.org/1391713002
Cr-Commit-Position: refs/heads/master@{#352916}
|
|
|
|
|
|
|
|
|
|
|
|
| |
Crash reports indicate that the array is at times empty. Use firstObject
instead of objectAtIndex:0, because firstObject will return nil instead
of raising an exception.
BUG=529723
Review URL: https://codereview.chromium.org/1380083005
Cr-Commit-Position: refs/heads/master@{#352915}
|
|
|
|
|
|
|
|
| |
BUG=540017
Review URL: https://codereview.chromium.org/1385633003
Cr-Commit-Position: refs/heads/master@{#352909}
|
|
|
|
|
|
|
|
|
| |
Noticed two places where IndexedDBBackingStore::Open() would fail, returning
a null database, but w/o setting the error status.
Review URL: https://codereview.chromium.org/1388643003
Cr-Commit-Position: refs/heads/master@{#352903}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new GL_CHROMIUM_sync_point proposal has been implemented now. The
old functions are all different enough that no names were overloaded,
so all of the old functionality still exists. This way, we can
incrementally move over call sites of the old functions to use the new
ones.
R=jam@chromium.org, piman@chromium.org
BUG=514815
Review URL: https://codereview.chromium.org/1331843005
Cr-Commit-Position: refs/heads/master@{#352901}
|
|
|
|
|
|
|
|
| |
This CL removes some TODOs that are either outdated or have proper bugs.
Review URL: https://codereview.chromium.org/1390263002
Cr-Commit-Position: refs/heads/master@{#352891}
|
|
|
|
|
|
|
|
|
|
| |
These are needed for startup reports.
BUG=538264
Review URL: https://codereview.chromium.org/1385253002
Cr-Commit-Position: refs/heads/master@{#352882}
|
|
|
|
|
|
|
|
|
|
| |
It was added a couple of years ago and is no longer relevant.
BUG=526694
Review URL: https://codereview.chromium.org/1383123002
Cr-Commit-Position: refs/heads/master@{#352880}
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Must be submitted after https://codereview.chromium.org/1340343003/
BUG=510398, 538660
Committed: https://crrev.com/bcc4ce71b07ea71a1056c3227c5bc381c52256fd
Cr-Commit-Position: refs/heads/master@{#352036}
Review URL: https://codereview.chromium.org/1366883002
Cr-Commit-Position: refs/heads/master@{#352866}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
not a direct sibling of the nearest non-text ancestor.
Example causing bug:
<div contenteditable><p>This a <a href="google.com">link</a>.</p></div>
Select all and observe that selection start on the <p> is 0 and 1 instead of 0 and hypertext_length.
Two fixes were required:
1. Uses child indices instead of only hyperlink character offsets to calculate if the selection is to the right or to the left of the current object,when the selection endpoints are in another part of the tree. This is because text-only objects don't have a hyperlink character offset since they are included in the hypertext as is and not via an embedded object character.
2. Extends GetHypertextoffsetFromChild to handle text-only children, instead of only hyperlinks.
R=aboxhall@chromium.org, dmazzoni@chromium.org
Review URL: https://codereview.chromium.org/1383373002
Cr-Commit-Position: refs/heads/master@{#352862}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a idiosyncrasy in blink input pipeline where when transforming
Core -> Web Input Events, WebInputEvent::timeStampSeconds field would get and
epoch timestamp value instead of a monotonic timestamp.
This occurs for any input event that gets passed to plugins including Pepper
plugins.
The patch does the following:
- Use platform timestamp to populate WebInputEvent::timeStampSeconds
- Teach Pepper to expect monotonic time in theat field and remove all
unnecessary machinery in Pepper to convert event time.
BUG=538199
Review URL: https://codereview.chromium.org/1369333009
Cr-Commit-Position: refs/heads/master@{#352856}
|
|
|
|
|
|
|
|
|
|
|
|
| |
Touch selection has been enabled by default for a few milestones and
there has been no major issues. There is only one layout test that
depends on touch selection to be disabled which is fixed accordingly.
BUG=304873
Review URL: https://codereview.chromium.org/1375753005
Cr-Commit-Position: refs/heads/master@{#352855}
|
|
|
|
|
|
|
|
|
|
|
|
| |
Earlier testSelectActionBarClearedOnTappingInput is failing
due to flakiness across devices. Now it has been observed no
issues while running the tests. Hence enabling it.
BUG=412004
Review URL: https://codereview.chromium.org/1386283004
Cr-Commit-Position: refs/heads/master@{#352844}
|
|
|
|
|
|
|
|
|
|
|
|
| |
with OpenGL.
Specific supressions will be re-added once the bot tries running the tests.
BUG=angleproject:1007
Review URL: https://codereview.chromium.org/1386223002
Cr-Commit-Position: refs/heads/master@{#352842}
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Created integration test to verify that VibrationManager mojo service
implementation is correctly exposed to the renderer.
Todo: Create browsertests for Java impl VibrationManager service
on android.
BUG=
Review URL: https://codereview.chromium.org/1312123003
Cr-Commit-Position: refs/heads/master@{#352838}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also adds some #include "base/basictypes.h" to remoting/ (uses uint16).
WebRTC 10183:10197
Changes: https://chromium.googlesource.com/external/webrtc/trunk/webrtc.git/+log/e2c433c..dd1d405
Libjingle 10176:10196
Changes: https://chromium.googlesource.com/external/webrtc/trunk/talk.git/+log/bfcf08f..cb124ee
BUG=webrtc:5024
R=henrika@chromium.org
TBR=sergeyu@chromium.org, mcasas@chromium.org
Review URL: https://codereview.chromium.org/1392713003
Cr-Commit-Position: refs/heads/master@{#352835}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
StoragePartitionHttpCacheDataRemover, the class that enables cache clearing based on time constraints [begin, end), is now able to estimate the size in bytes of entries that would be deleted, without actually deleting them.
The actual computation was so far implemented only for the Blockfile cache backend. Simple and Memory backends to be done in follow-up CLs (but the infrastructure is in place, since disk_cache::Backend is purely virtual).
Update: I missed Backend V3 and testing subclasses. They were added in Patch 3.
Added one browsertest for this functionality.
BUG=510028
Review URL: https://codereview.chromium.org/1304363013
Cr-Commit-Position: refs/heads/master@{#352830}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
classes
This is a refactoring CL for ServiceWorkerProviderContext.
ServiceWorkerProviderContext is used for a variety of things:
For a controlled document, it's used for keeping a controller alive until
ServiceWorkerContainer is created. For ServiceWorkerGlobalScope, it's used for
keeping an associated registration and its versions alive until the worker
context is initialized. This mixed use impairs the readability.
This CL carves them out to delegate classes to improve readability. In addition,
this removes a lock to protect service worker versions accessed from both the
main thread and the worker thread (this access pattern can happen only when a
provider context is created for ServiceWorkerGlobalScope). Actually the lock was
not necessary because ownership of the versions are transferred from the main
thread to the worker thread after registration association is done.
BUG=532098
Review URL: https://codereview.chromium.org/1344783002
Cr-Commit-Position: refs/heads/master@{#352807}
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reference images have been generated. Verified by hand (via GPU pixel
wrangling instructions) that they're correct.
BUG=534114, 540531
TBR=bajones@chromium.org,zmo@chromium.org
Review URL: https://codereview.chromium.org/1392783002
Cr-Commit-Position: refs/heads/master@{#352780}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
id:340001 of https://codereview.chromium.org/1354483004/ )
Reason for revert:
libosmesa open failure has gone, but tests are still failing.
http://build.chromium.org/p/chromium.linux/builders/Linux%20GN/builds/32956
http://build.chromium.org/p/chromium.linux/builders/Linux%20GN/builds/32957
http://build.chromium.org/p/chromium.linux/builders/Linux%20GN/builds/32958
Original issue's description:
> Re-land: ui: Add GLImage unit test framework.
>
> This makes it possible to test GLImage implementations without
> requiring multi-process GpuMemoryBuffer support.
>
> This initial version is limited to testing CopyTexSubImage with
> the default buffer format but testing of more functionality and
> formats will be added in follow up patches.
>
> Also inlcudes some minor cleanup needed to not have GLImage
> implementations depend on GpuMemoryBuffer API.
>
> BUG=
> CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
>
> Committed: https://crrev.com/11b3655a4dfd5b46f7783421e2959a41ddbf3a00
> Cr-Commit-Position: refs/heads/master@{#352767}
TBR=dcastagna@chromium.org,glider@chromium.org,piman@chromium.org,sky@chromium.org,reveman@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
Review URL: https://codereview.chromium.org/1390143002
Cr-Commit-Position: refs/heads/master@{#352779}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it possible to test GLImage implementations without
requiring multi-process GpuMemoryBuffer support.
This initial version is limited to testing CopyTexSubImage with
the default buffer format but testing of more functionality and
formats will be added in follow up patches.
Also inlcudes some minor cleanup needed to not have GLImage
implementations depend on GpuMemoryBuffer API.
BUG=
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1354483004
Cr-Commit-Position: refs/heads/master@{#352767}
|
|
|
|
|
|
|
|
|
|
| |
We'd like to be able to enable heavier sets of categories in limited cases (like startup) where once the histogram has touched, regardless if it's in the range we care about we want to stop tracing since the set of categories is too heavy to keep running.
BUG=538264
Review URL: https://codereview.chromium.org/1388513002
Cr-Commit-Position: refs/heads/master@{#352746}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://codereview.chromium.org/1354483004/ )
Reason for revert:
Those tests are failing on Linux GN bot.
failures:
GLImageRefCountedMemory/GLImageTest/0.CopyTexSubImage
GLImageSharedMemory/GLImageTest/0.CopyTexSubImage
http://build.chromium.org/p/chromium.linux/builders/Linux%20GN/builds/32944
http://build.chromium.org/p/chromium.linux/builders/Linux%20GN/builds/32945
http://build.chromium.org/p/chromium.linux/builders/Linux%20GN/builds/32946
Original issue's description:
> ui: Add GLImage unit test framework.
>
> This makes it possible to test GLImage implementations without
> requiring multi-process GpuMemoryBuffer support.
>
> This initial version is limited to testing CopyTexSubImage with
> the default buffer format but testing of more functionality and
> formats will be added in follow up patches.
>
> Also inlcudes some minor cleanup needed to not have GLImage
> implementations depend on GpuMemoryBuffer API.
>
> BUG=
> CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
>
> Committed: https://crrev.com/f9d17986fef45ad30ef4e6e468a7a56a90851508
> Cr-Commit-Position: refs/heads/master@{#352720}
TBR=dcastagna@chromium.org,glider@chromium.org,piman@chromium.org,sky@chromium.org,reveman@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
Review URL: https://codereview.chromium.org/1390083002
Cr-Commit-Position: refs/heads/master@{#352743}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are no call sites that need this anymore, the behavior
can be achieved in other ways now that OutputSurface creation
has been async for a while.
Also make the default LTH state invisible to match the scheduler
init state. This also avoids races where we'd otherwise schedule
actions when starting the proxy (i.e. LTH creation time)
which were previously delayed until setLTHClientReady().
BUG=538714,539991
TBR=dtrainor@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1385043002
Cr-Commit-Position: refs/heads/master@{#352742}
|
|
|
|
|
|
|
|
| |
R=shatch
Review URL: https://codereview.chromium.org/1390893002
Cr-Commit-Position: refs/heads/master@{#352741}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds a watch dog player to listen to android MediaServer
crashes.
When the number of crashes reaches a certain threshold,
all media decoding using Android MediaPlayer/MediaCodec will be throttled.
This will throttle both media and webaudio implementation.
BUG=532745
Review URL: https://codereview.chromium.org/1372203002
Cr-Commit-Position: refs/heads/master@{#352740}
|
|
|
|
|
|
|
|
| |
R=shatch,sievers
Review URL: https://codereview.chromium.org/1389813002
Cr-Commit-Position: refs/heads/master@{#352738}
|
|
|
|
|
|
|
|
|
|
| |
This is a refactor with no intended functional effects.
BUG=535711
Review URL: https://codereview.chromium.org/1382303003
Cr-Commit-Position: refs/heads/master@{#352735}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Mac OS, this flag has the side-effect of turning on the Core
Profile rendering path. Run the pixel tests in this mode to prevent
future regressions.
Ideally these would be run in this mode on all platforms but I'm
concerned about what might happen on Android. Since it's critically
important that we don't regress this code path on Mac OS again,
committing these tests initially for Mac only.
BUG=534114
Review URL: https://codereview.chromium.org/1385323002
Cr-Commit-Position: refs/heads/master@{#352726}
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a huge source of crashes and hangs. The below
bug is representative. Query crash for a longer list
BUG=537647
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/1391583004
Cr-Commit-Position: refs/heads/master@{#352723}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it possible to test GLImage implementations without
requiring multi-process GpuMemoryBuffer support.
This initial version is limited to testing CopyTexSubImage with
the default buffer format but testing of more functionality and
formats will be added in follow up patches.
Also inlcudes some minor cleanup needed to not have GLImage
implementations depend on GpuMemoryBuffer API.
BUG=
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1354483004
Cr-Commit-Position: refs/heads/master@{#352720}
|
|
|
|
|
|
|
|
|
|
|
| |
InterfacePtr is thread hostile so InterfacePtrInfo should be used
instead when moving between threads.
BUG=534719
Review URL: https://codereview.chromium.org/1349603002
Cr-Commit-Position: refs/heads/master@{#352717}
|
|
|
|
|
|
|
|
|
|
|
| |
objects.
R=ortuno@chromium.org
BUG=484781
Review URL: https://codereview.chromium.org/1377453007
Cr-Commit-Position: refs/heads/master@{#352692}
|
|
|
|
|
|
|
|
| |
Negative values would indicate a corrupt database.
Review URL: https://codereview.chromium.org/1386943003
Cr-Commit-Position: refs/heads/master@{#352679}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The print functions in stringprintf.h were not annotated for /analyze so
13 Windows specific format-string bugs accumulated. This annotates the
functions so that the /analyze builder will find the problems and fixes
the bugs.
R=thestig@chromium.org,wfh@chromium.org,jam@chromium.org
Skipping wstring presubmit checks - no new wstring usage is added
NOPRESUBMIT=true
BUG=427616
Review URL: https://codereview.chromium.org/1372153002
Cr-Commit-Position: refs/heads/master@{#352659}
|
|
|
|
|
|
|
|
|
|
|
| |
In preparation for the zero copy backing strategy, this CL moves the
construction of the surface texture to the BackingStrategy.
BUG=536097
Review URL: https://codereview.chromium.org/1370443007
Cr-Commit-Position: refs/heads/master@{#352649}
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes an issue with ~FrameTree() which would be problematic if
scoped_ptr were made to have the null-before-delete semantics of
libc++'s unique_ptr.
BUG=535321
Review URL: https://codereview.chromium.org/1380253004
Cr-Commit-Position: refs/heads/master@{#352630}
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move BlinkTestPlatformInitialize() and CheckLayoutSystemDeps() functions into
the test_runner component out of content, and use that from web_view test-runner
for mandoline.
BUG=531585
Review URL: https://codereview.chromium.org/1383803002
Cr-Commit-Position: refs/heads/master@{#352625}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://codereview.chromium.org/1375293004/ )
Reason for revert:
Broke this blink bot: http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux/builds/55132
Original issue's description:
> ServiceWorkerWriteToCacheJob: refactor
>
> This CL is a re-land of a previously reviewed and approved CL that was reverted: https://codereview.chromium.org/1356153002/
>
> ServiceWorkerWriteToCacheJob is a subclass of URLRequestJob that is responsible for filling and updating a write-through cache for ServiceWorker data. Specifically, ServiceWorkerWriteToCacheJob creates an underlying URLRequestJob which it uses to do the actual network request for the script, then returns the script body to the creator of the ServiceWorkerWriteToCacheJob while also storing it in the ServiceWorker cache if it has been updated.
>
> In order to avoid spurious cache rewrites, ServiceWorkerWriteToCacheJob defers writing an entry for as long as possible: if there is an existing entry, it compares incoming network data to the cache entry's data, and only starts writing once there is a mismatch. Since the mismatch may occur after much data has already been handled, once this happens ServiceWorkerWriteToCacheJob must transparently copy all the existing data up to that point from the cache, then resume streaming network data into the cache and back to its consumer. This is the "compare-and-copy" process. If there is no existing entry, network data is streamed directly to the cache; this is the "passthrough" process.
>
> This CL removes the code implementing the compare-and-copy and passthrough processes from ServiceWorkerWriteToCacheJob and moves it into a separate class, ServiceWorkerCacheWriter. ServiceWorkerCacheWriter exposes an asynchronous API for overwriting a single cache entry that is now used by ServiceWorkerWriteToCacheJob.
>
> BUG=474859
> TBR=jochen,falken
>
> Committed: https://crrev.com/7320022d75696c0f0b4ea02ed801fbbec4783658
> Cr-Commit-Position: refs/heads/master@{#352593}
TBR=mmenke@chromium.org,michaeln@chromium.org,falken@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=474859
Review URL: https://codereview.chromium.org/1388123002
Cr-Commit-Position: refs/heads/master@{#352619}
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When AllOrNothing strategy get enabled, it will not schedule the primary plane
when it successfully promoted all quads into overlays.
Also removed OverlayPlane::Type, it is no longer needed.
BUG=533687
Review URL: https://codereview.chromium.org/1369243005
Cr-Commit-Position: refs/heads/master@{#352609}
|
|
|
|
|
|
|
|
|
|
| |
This is a spin-off of https://codereview.chromium.org/1294243004/
BUG=440463
Review URL: https://codereview.chromium.org/1315023004
Cr-Commit-Position: refs/heads/master@{#352608}
|
|
|
|
|
|
|
|
|
|
| |
The new BackgroundSyncController allows content::BackgroundSyncManager to access Chrome features like Rappor and, in a followup CL, the BackgroundSyncLauncher.
BUG=538640
Review URL: https://codereview.chromium.org/1369823003
Cr-Commit-Position: refs/heads/master@{#352605}
|
|
|
|
|
|
|
|
|
|
|
|
| |
The variable names blink::WebCursorInfo type so having 'webkit' on the
name does not make sense anymore.
BUG=None
R=avi@chromium.org
Review URL: https://codereview.chromium.org/1386033002
Cr-Commit-Position: refs/heads/master@{#352604}
|
|
|
|
|
|
|
|
|
|
| |
connectivity
BUG=539313
Review URL: https://codereview.chromium.org/1376933007
Cr-Commit-Position: refs/heads/master@{#352601}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL is a re-land of the following commit, which was reverted in order
to make sure we have consistent behaviour in the M47 branch.
https://crrev.com/075bd08c1c9394cf34c3ea2820eb8527a7946d52
https://crrev.com/f13ff3a932b25f241735b160e2c2c9dddf37c60e (revert)
(Unchanged, so TBRing the reviewers again).
This is a simple search-and-replace job changing curve25519(dh) with
p256(dh) in the plumbing for the Web Push encryption code. There are
no functional changes, and the generated keys are still in Curve25519
format - this will be addressed in a follow-up patch.
Note that this functionality hasn't shipped yet, and is only being
used in tests, all of which are fixed per this CL.
BUG=486040
TBR=miguelg@chromium.org, avi@chromium.org, mkwst@chromium.org
Review URL: https://codereview.chromium.org/1392503002
Cr-Commit-Position: refs/heads/master@{#352595}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL is a re-land of a previously reviewed and approved CL that was reverted: https://codereview.chromium.org/1356153002/
ServiceWorkerWriteToCacheJob is a subclass of URLRequestJob that is responsible for filling and updating a write-through cache for ServiceWorker data. Specifically, ServiceWorkerWriteToCacheJob creates an underlying URLRequestJob which it uses to do the actual network request for the script, then returns the script body to the creator of the ServiceWorkerWriteToCacheJob while also storing it in the ServiceWorker cache if it has been updated.
In order to avoid spurious cache rewrites, ServiceWorkerWriteToCacheJob defers writing an entry for as long as possible: if there is an existing entry, it compares incoming network data to the cache entry's data, and only starts writing once there is a mismatch. Since the mismatch may occur after much data has already been handled, once this happens ServiceWorkerWriteToCacheJob must transparently copy all the existing data up to that point from the cache, then resume streaming network data into the cache and back to its consumer. This is the "compare-and-copy" process. If there is no existing entry, network data is streamed directly to the cache; this is the "passthrough" process.
This CL removes the code implementing the compare-and-copy and passthrough processes from ServiceWorkerWriteToCacheJob and moves it into a separate class, ServiceWorkerCacheWriter. ServiceWorkerCacheWriter exposes an asynchronous API for overwriting a single cache entry that is now used by ServiceWorkerWriteToCacheJob.
BUG=474859
TBR=jochen,falken
Review URL: https://codereview.chromium.org/1375293004
Cr-Commit-Position: refs/heads/master@{#352593}
|