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

Issue 436563004: Fix for 0-length file problem in content verification (Closed)

Created:
6 years, 4 months ago by asargent_no_longer_on_chrome
Modified:
6 years, 4 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Project:
chromium
Visibility:
Public.

Description

Fix for 0-length file problem in extension content verification The problem is that we were generating zero hashes when there were no input bytes, when we should have generated one. To make this fix a little easier to test, I moved the code for generating hashes of content into a utility funciton in computed_hashes.{h,cc}. Also, in order to fix things for any profiles that might have incorrect computed_hashes.json files, I changed the format of it to add the notion of a version. When the format or version isn't recognized, the code will return an error from the Init function, and then the code that uses it elsewhere in the content verification code will automatically try to recreate it. BUG=399251 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287740

Patch Set 1 : ready for review #

Total comments: 16

Patch Set 2 : fixes from review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -34 lines) Patch
M extensions/browser/computed_hashes.h View 2 chunks +11 lines, -3 lines 0 comments Download
M extensions/browser/computed_hashes.cc View 1 5 chunks +59 lines, -9 lines 0 comments Download
M extensions/browser/computed_hashes_unittest.cc View 1 2 chunks +55 lines, -0 lines 0 comments Download
M extensions/browser/content_hash_fetcher.cc View 2 chunks +1 line, -22 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
asargent_no_longer_on_chrome
6 years, 4 months ago (2014-08-05 22:25:28 UTC) #1
Ken Rockot(use gerrit already)
lgtm https://codereview.chromium.org/436563004/diff/40001/extensions/browser/computed_hashes.cc File extensions/browser/computed_hashes.cc (right): https://codereview.chromium.org/436563004/diff/40001/extensions/browser/computed_hashes.cc#newcode24 extensions/browser/computed_hashes.cc:24: } nit: It's still a pretty small block, ...
6 years, 4 months ago (2014-08-05 23:10:32 UTC) #2
asargent_no_longer_on_chrome
https://codereview.chromium.org/436563004/diff/40001/extensions/browser/computed_hashes.cc File extensions/browser/computed_hashes.cc (right): https://codereview.chromium.org/436563004/diff/40001/extensions/browser/computed_hashes.cc#newcode24 extensions/browser/computed_hashes.cc:24: } On 2014/08/05 23:10:32, Ken Rockot wrote: > nit: ...
6 years, 4 months ago (2014-08-06 04:47:33 UTC) #3
asargent_no_longer_on_chrome
The CQ bit was checked by asargent@chromium.org
6 years, 4 months ago (2014-08-06 04:47:43 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asargent@chromium.org/436563004/60001
6 years, 4 months ago (2014-08-06 04:50:31 UTC) #5
commit-bot: I haz the power
6 years, 4 months ago (2014-08-06 09:13:44 UTC) #6
Message was sent while issue was closed.
Change committed as 287740

Powered by Google App Engine
This is Rietveld 408576698