summaryrefslogtreecommitdiffstats
path: root/extensions/browser/content_hash_reader.cc
Commit message (Collapse)AuthorAgeFilesLines
* Comparison and streaming operators for base::Versionrobpercival2016-01-251-1/+1
| | | | | | | | | | | | | Changes base::Version to comply with updated style guide. See discussion here: https://groups.google.com/a/chromium.org/d/topic/chromium-dev/8Q6Po7y0Kc4/discussion Replaces Version::Equals and Version::IsOlderThan. Review URL: https://codereview.chromium.org/1575523002 Cr-Commit-Position: refs/heads/master@{#371279}
* Accessing directories in extensions should not cause content verifier failure.wmaslowski2015-04-231-1/+1
| | | | | | | | BUG=479598 Review URL: https://codereview.chromium.org/1105493002 Cr-Commit-Position: refs/heads/master@{#326480}
* Fix case-sensitivity problems in extension content verificationasargent2014-09-261-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | On case-insensitive filesystems, extensions can generate requests (script src tags, XHR's, etc.) to their own resources using a relative path with incorrect case and have those requests work (see crbug.com/29941 for some history). However, for extension content verification, we were looking up the expected file content hashes using the relative path given in the request, not the actual filename, which meant that any difference in case would be treated as "no hashes for this file". This patch switches to using case-insensitive lookups, but uses a multimap so that case-sensitive filesystems should not experience problems. BUG=412693 TEST=Install the test extension at http://goo.gl/rOpGDu, and turn on content verification to Enforce mode in about:flags. Without this patch, the extension will get force disabled on windows/mac. With the patch, this should be fixed. Review URL: https://codereview.chromium.org/585583003 Cr-Commit-Position: refs/heads/master@{#297032}
* Cleanup: Use base/files/file_util.h instead of base/file_util.h in apps/ and ↵thestig2014-09-101-1/+1
| | | | | | | | extensions/ Review URL: https://codereview.chromium.org/558833002 Cr-Commit-Position: refs/heads/master@{#294136}
* Content verification: Don't fail on non-existence.rockot2014-08-271-0/+8
| | | | | | | | | | | | This prevents content verification (when active) from disabling an extension when the extension attempts to load a non-existent resource in its own chrome-extension URL space. BUG=404802 Review URL: https://codereview.chromium.org/512573003 Cr-Commit-Position: refs/heads/master@{#292095}
* Performance histograms for extension content verificationasargent@chromium.org2014-06-231-0/+5
| | | | | | | | | BUG=387158 TBR=rockot@chromium.org Review URL: https://codereview.chromium.org/341263003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279166 0039d316-1c4b-4281-b951-d872f2087c98
* Fix several problems with the content verification codeasargent@chromium.org2014-06-181-13/+18
| | | | | | | | | | | | | | | | | | -While we're doing the initial scan of files to build up computed_hashes.json, if we notice a mismatch, report that right away. This also fixes problems where if you modify/delete computed_hashes.json, enforcement would never work. -Avoid an infinite loop in ContentVerifyJob by making sure we stop checking newly read bytes after we've already reported a failure (we were stuck failing to advance to the next block after reporting a failure) BUG=375992,375953 Review URL: https://codereview.chromium.org/329303007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278071 0039d316-1c4b-4281-b951-d872f2087c98
* A bunch of remaining parts of extension content verification (Reland)asargent@chromium.org2014-05-161-4/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | -The real guts of content_hash_fetcher.cc, which fetches the verified_contents.json file from the webstore if needed and also runs tasks to compute and cache the block-level hashes of all files in an extension. -The real guts of content_hash_reader.cc, which uses the work done by the content_hash_fetcher during validation of extension file content as it's read off of disk at time of use. -Code to avoid verifying transcoded files (images used in browser process, and message catalogs). -Don't allow downgrade of mode via kForceFieldTrials command line switch -Various bits of plumbing to support all of the above This is a re-land with fixes; original review was: https://codereview.chromium.org/289533003 BUG=369895,373854 R=rockot@chromium.org Review URL: https://codereview.chromium.org/288273004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270937 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 270694 "A bunch of remaining parts of extension content v..."jiayl@chromium.org2014-05-151-70/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > A bunch of remaining parts of extension content verification > > -The real guts of content_hash_fetcher.cc, which fetches the > verified_contents.json file from the webstore if needed and also runs > tasks to compute and cache the block-level hashes of all files in an > extension. > > -The real guts of content_hash_reader.cc, which uses the work done by > the content_hash_fetcher during validation of extension file content as > it's read off of disk at time of use. > > -Code to avoid verifying transcoded files (images used in browser > process, and message catalogs). > > -Don't allow downgrade of mode via kForceFieldTrials command line switch > > -Various bits of plumbing to support all of the above > > BUG=369895 > R=rockot@chromium.org > > Review URL: https://codereview.chromium.org/289533003 TBR=asargent@chromium.org Review URL: https://codereview.chromium.org/284223002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270734 0039d316-1c4b-4281-b951-d872f2087c98
* A bunch of remaining parts of extension content verificationasargent@chromium.org2014-05-151-4/+70
| | | | | | | | | | | | | | | | | | | | | | | | | -The real guts of content_hash_fetcher.cc, which fetches the verified_contents.json file from the webstore if needed and also runs tasks to compute and cache the block-level hashes of all files in an extension. -The real guts of content_hash_reader.cc, which uses the work done by the content_hash_fetcher during validation of extension file content as it's read off of disk at time of use. -Code to avoid verifying transcoded files (images used in browser process, and message catalogs). -Don't allow downgrade of mode via kForceFieldTrials command line switch -Various bits of plumbing to support all of the above BUG=369895 R=rockot@chromium.org Review URL: https://codereview.chromium.org/289533003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270694 0039d316-1c4b-4281-b951-d872f2087c98
* More implementation details of extension content verificationasargent@chromium.org2014-05-101-0/+41
-Added classes for fetching/reading file hashes (.cc details are still mostly stubs in this CL though) -Added a delegate class for ContentVerifier to rework how clients interact with it -Added code in ContentVerifyJob that uses the hash reader class BUG=369895 R=rockot@chromium.org Review URL: https://codereview.chromium.org/280013003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269633 0039d316-1c4b-4281-b951-d872f2087c98