Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Issue 266963003: Beginning of support for extension content verification (Closed)

Created:
6 years, 7 months ago by asargent_no_longer_on_chrome
Modified:
6 years, 7 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, cbentzel+watch_chromium.org, extensions-reviews_chromium.org
Visibility:
Public.

Description

Beginning of support for extension content verification The basic idea is that the webstore will provide signed expected hashes of file content that can be checked during runtime in the browser to detect corruption due to disk errors or malware. This CL has a lot of the high-level pieces, with several of the details left out for subsequent CLs to make this one more easily digestible. The design is that there is a ContentVerifier for each BrowserContext which can be used anywhere we read from files inside an extension. It vends out ContentVerifyJob's, which need to be informed of the bytes read from each file, and will know how to check those against a set of expected block hashes. If the job detects contents that don't match what was expected, it will notify the verifier. BUG=369895 R=rvargas@chromium.org, yoz@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=269108

Patch Set 1 : ready for review #

Patch Set 2 : oops, forgot to upload minor cosmetic changes to test #

Total comments: 16

Patch Set 3 : responded to review comments #

Total comments: 4

Patch Set 4 : net code changes #

Total comments: 2

Patch Set 5 : fixed nit, and small change to fix browser tests #

Patch Set 6 : merged latest trunk #

Unified diffs Side-by-side diffs Delta from patch set Stats (+753 lines, -41 lines) Patch
M apps/shell/browser/shell_extension_system.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M apps/shell/browser/shell_extension_system.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/browser/extensions/content_verifier_browsertest.cc View 1 2 1 chunk +152 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 2 3 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_system_impl.h View 1 2 4 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_system_impl.cc View 1 2 3 4 6 chunks +27 lines, -0 lines 0 comments Download
M chrome/browser/extensions/test_extension_system.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/test_extension_system.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/user_script_master.h View 4 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/extensions/user_script_master.cc View 6 chunks +41 lines, -6 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/content_verifier/v1.crx View Binary file 0 comments Download
A + chrome/test/data/extensions/content_verifier/v1/manifest.json View 1 chunk +1 line, -1 line 0 comments Download
A + chrome/test/data/extensions/content_verifier/v1/page.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A extensions/browser/content_verifier.h View 1 2 1 chunk +103 lines, -0 lines 0 comments Download
A extensions/browser/content_verifier.cc View 1 2 1 chunk +125 lines, -0 lines 0 comments Download
A extensions/browser/content_verifier_filter.h View 1 chunk +23 lines, -0 lines 0 comments Download
A extensions/browser/content_verify_job.h View 1 2 1 chunk +97 lines, -0 lines 0 comments Download
A extensions/browser/content_verify_job.cc View 1 2 1 chunk +69 lines, -0 lines 0 comments Download
M extensions/browser/extension_protocols.h View 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/extension_protocols.cc View 1 2 3 4 9 chunks +36 lines, -25 lines 0 comments Download
M extensions/browser/extension_system.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M extensions/browser/info_map.h View 3 chunks +6 lines, -0 lines 0 comments Download
M extensions/browser/info_map.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M extensions/common/switches.h View 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/common/switches.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M extensions/extensions.gyp View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M net/url_request/url_request_file_job.h View 1 chunk +2 lines, -0 lines 0 comments Download
M net/url_request/url_request_file_job.cc View 1 2 3 1 chunk +9 lines, -7 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
asargent_no_longer_on_chrome
yoz: please review (It may look big at first glance but a lot of it ...
6 years, 7 months ago (2014-05-05 20:25:54 UTC) #1
Yoyo Zhou
overall design LGTM, some nits https://chromiumcodereview.appspot.com/266963003/diff/40001/chrome/browser/extensions/content_verifier_browsertest.cc File chrome/browser/extensions/content_verifier_browsertest.cc (right): https://chromiumcodereview.appspot.com/266963003/diff/40001/chrome/browser/extensions/content_verifier_browsertest.cc#newcode124 chrome/browser/extensions/content_verifier_browsertest.cc:124: ContentVerifyJob::SetDelegateForTests(NULL); This doesn't seem ...
6 years, 7 months ago (2014-05-07 02:25:59 UTC) #2
asargent_no_longer_on_chrome
responded to comments https://chromiumcodereview.appspot.com/266963003/diff/40001/chrome/browser/extensions/content_verifier_browsertest.cc File chrome/browser/extensions/content_verifier_browsertest.cc (right): https://chromiumcodereview.appspot.com/266963003/diff/40001/chrome/browser/extensions/content_verifier_browsertest.cc#newcode124 chrome/browser/extensions/content_verifier_browsertest.cc:124: ContentVerifyJob::SetDelegateForTests(NULL); On 2014/05/07 02:25:59, Yoyo Zhou ...
6 years, 7 months ago (2014-05-07 06:56:42 UTC) #3
asargent_no_longer_on_chrome
rvargas: please review net/url_request/url_request_file_job.h (you can see where this is used in extensions/browser/extension_protocols.cc) Thanks!
6 years, 7 months ago (2014-05-07 06:58:34 UTC) #4
rvargas (doing something else)
https://codereview.chromium.org/266963003/diff/60001/extensions/browser/extension_protocols.cc File extensions/browser/extension_protocols.cc (right): https://codereview.chromium.org/266963003/diff/60001/extensions/browser/extension_protocols.cc#newcode220 extensions/browser/extension_protocols.cc:220: if (verify_job_.get()) nit: get() is not needed for boolean ...
6 years, 7 months ago (2014-05-07 18:29:55 UTC) #5
asargent_no_longer_on_chrome
rvargas: PTAL https://codereview.chromium.org/266963003/diff/60001/extensions/browser/extension_protocols.cc File extensions/browser/extension_protocols.cc (right): https://codereview.chromium.org/266963003/diff/60001/extensions/browser/extension_protocols.cc#newcode220 extensions/browser/extension_protocols.cc:220: if (verify_job_.get()) On 2014/05/07 18:29:55, rvargas wrote: ...
6 years, 7 months ago (2014-05-07 20:21:51 UTC) #6
Yoyo Zhou
extensions changes LGTM
6 years, 7 months ago (2014-05-07 20:32:26 UTC) #7
rvargas (doing something else)
lgtm https://codereview.chromium.org/266963003/diff/80001/extensions/browser/extension_protocols.cc File extensions/browser/extension_protocols.cc (right): https://codereview.chromium.org/266963003/diff/80001/extensions/browser/extension_protocols.cc#newcode245 extensions/browser/extension_protocols.cc:245: if (remaining_bytes() == 0) Very small nit: maybe ...
6 years, 7 months ago (2014-05-08 17:50:07 UTC) #8
asargent_no_longer_on_chrome
all comments addressed, thanks for reviews https://codereview.chromium.org/266963003/diff/80001/extensions/browser/extension_protocols.cc File extensions/browser/extension_protocols.cc (right): https://codereview.chromium.org/266963003/diff/80001/extensions/browser/extension_protocols.cc#newcode245 extensions/browser/extension_protocols.cc:245: if (remaining_bytes() == ...
6 years, 7 months ago (2014-05-08 18:02:07 UTC) #9
asargent_no_longer_on_chrome
6 years, 7 months ago (2014-05-08 23:54:35 UTC) #10
Message was sent while issue was closed.
Committed patchset #6 manually as r269108 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698