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

Issue 136473008: Ensure no changes to the JSONSerializer or PrefHashCalculator ever end up producing different hashe… (Closed)

Created:
6 years, 11 months ago by gab
Modified:
6 years, 11 months ago
Reviewers:
Bernhard Bauer
CC:
chromium-reviews, erikwright (departed), robertshield
Visibility:
Public.

Description

Ensure no changes to the JSONSerializer or PrefHashCalculator ever end up producing different hashes for all existing Value::Type. The current JSON serialization used "appears" to be standard and future-proof (i.e., doesn't use pretty_print or anything silly). However, the hashing mechanism must be strong in the face of any potential future logic changes to either JSONWriter, JSONStringValueSerializer, PrefHashCalculator. This test protects against that. As highlighted in code comments these test hashes must never be altered to satisfy a code logic change or PrefHash* breaks. Kept existing test hashes for list/dict values and expanded the test to all other values. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245576

Patch Set 1 : #

Total comments: 4

Patch Set 2 : review:bauerb #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -27 lines) Patch
M chrome/browser/prefs/pref_hash_calculator_unittest.cc View 1 2 chunks +90 lines, -27 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
gab
Bernhard, PTAL. Cheers! Gab
6 years, 11 months ago (2014-01-16 23:25:15 UTC) #1
Bernhard Bauer
LGTM with nits: https://codereview.chromium.org/136473008/diff/30001/chrome/browser/prefs/pref_hash_calculator_unittest.cc File chrome/browser/prefs/pref_hash_calculator_unittest.cc (right): https://codereview.chromium.org/136473008/diff/30001/chrome/browser/prefs/pref_hash_calculator_unittest.cc#newcode82 chrome/browser/prefs/pref_hash_calculator_unittest.cc:82: scoped_ptr<base::Value> int_value(base::Value::CreateIntegerValue( Nit: I probably would ...
6 years, 11 months ago (2014-01-17 12:23:04 UTC) #2
gab
Thanks, done! https://codereview.chromium.org/136473008/diff/30001/chrome/browser/prefs/pref_hash_calculator_unittest.cc File chrome/browser/prefs/pref_hash_calculator_unittest.cc (right): https://codereview.chromium.org/136473008/diff/30001/chrome/browser/prefs/pref_hash_calculator_unittest.cc#newcode82 chrome/browser/prefs/pref_hash_calculator_unittest.cc:82: scoped_ptr<base::Value> int_value(base::Value::CreateIntegerValue( On 2014/01/17 12:23:05, Bernhard Bauer ...
6 years, 11 months ago (2014-01-17 16:22:15 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/136473008/130001
6 years, 11 months ago (2014-01-17 16:23:27 UTC) #4
commit-bot: I haz the power
6 years, 11 months ago (2014-01-17 19:03:26 UTC) #5
Message was sent while issue was closed.
Change committed as 245576

Powered by Google App Engine
This is Rietveld 408576698