DevTools: [Persistence] validate persistence binding.
This patch ensures that persistence binding is not established if working copy
of network UISourceCode does not match with the working copy of filesystem
UISourceCode.
This validation is done proactively: whenever automapping reports a binding,
we fetch contents of both network and filesystem UISourceCodes and compare them.
For this to work fast, we do *not* validate the following types of bindings:
- bindings of source map sources. These could be slow to fetch, and they don't break us in any
way.
- bindings of binary files (e.g. images). These are never going to be edited, and
thus can't deal any harm.
To sum up, we request contents only of those text resources which were already
succesfully loaded by the website itself, which means they are of manageble size.
However, to be on the safe side, this change is guarded by on-by-default experiment.
BUG=
649837
R=dgozman
Committed:
https://crrev.com/7b5206fba773fc4f5ce4ba32691fd825a9eed17a
Cr-Commit-Position: refs/heads/master@{#437761}