|
|
Chromium Code Reviews|
Created:
7 years, 7 months ago by ghc Modified:
7 years, 7 months ago Reviewers:
rlarocque CC:
chromium-reviews Base URL:
http://src.chromium.org/svn/trunk/src/ Visibility:
Public. |
Descriptionroll cacheinvalidation forward to @302
Summary of changes:
- Use a random value for the token-assignment nonce instead of the current time.
- Add RandUint64 to the Random class and override.
TBR=brettw@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=198756
Patch Set 1 #
Total comments: 4
Patch Set 2 : #
Total comments: 2
Patch Set 3 : Initial #Patch Set 4 : Again #Messages
Total messages: 17 (0 generated)
https://codereview.chromium.org/14822002/diff/1/third_party/cacheinvalidation... File third_party/cacheinvalidation/overrides/google/cacheinvalidation/deps/random.h (right): https://codereview.chromium.org/14822002/diff/1/third_party/cacheinvalidation... third_party/cacheinvalidation/overrides/google/cacheinvalidation/deps/random.h:10: #define INT64_MAX 9223372036854775807L Could you rely on base/basictypes.h instead? It defines kint64max. If that won't work, how about std::numeric_limits<int64>? https://codereview.chromium.org/14822002/diff/1/third_party/cacheinvalidation... third_party/cacheinvalidation/overrides/google/cacheinvalidation/deps/random.h:22: virtual double RandDouble() { I see in r299 you use this to generate a random string. base/rand_util.h has a RandBytes function that might be more convenient, if you can expose it through this API. (It might be more correct, too. I think the method used to generate the random string will have less than the 63 bits of randomness that the nearby comment claims it has.)
https://codereview.chromium.org/14822002/diff/1/third_party/cacheinvalidation... File third_party/cacheinvalidation/overrides/google/cacheinvalidation/deps/random.h (right): https://codereview.chromium.org/14822002/diff/1/third_party/cacheinvalidation... third_party/cacheinvalidation/overrides/google/cacheinvalidation/deps/random.h:10: #define INT64_MAX 9223372036854775807L On 2013/05/02 17:38:09, rlarocque wrote: > Could you rely on base/basictypes.h instead? It defines kint64max. > > If that won't work, how about std::numeric_limits<int64>? Removed this and added a RandUint64 call, which is easy to implement. https://codereview.chromium.org/14822002/diff/1/third_party/cacheinvalidation... third_party/cacheinvalidation/overrides/google/cacheinvalidation/deps/random.h:22: virtual double RandDouble() { On 2013/05/02 17:38:09, rlarocque wrote: > I see in r299 you use this to generate a random string. base/rand_util.h has a > RandBytes function that might be more convenient, if you can expose it through > this API. > > (It might be more correct, too. I think the method used to generate the random > string will have less than the 63 bits of randomness that the nearby comment > claims it has.) (See above comment.)
Thanks, that looks much better. LGTM. https://codereview.chromium.org/14822002/diff/5001/third_party/cacheinvalidat... File third_party/cacheinvalidation/overrides/google/cacheinvalidation/deps/random.h (right): https://codereview.chromium.org/14822002/diff/5001/third_party/cacheinvalidat... third_party/cacheinvalidation/overrides/google/cacheinvalidation/deps/random.h:25: return base::RandUint64(); The Clang style-checked would normally reject this. See http://www.chromium.org/developers/coding-style/chromium-style-checker-errors... . It seems that the style-checker isn't being run over this file, otherwise you would have already run into problems with the RandDouble() function. You probably should fix this sooner or later, but I won't hold up the review for it.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ghc@google.com/14822002/5001
https://codereview.chromium.org/14822002/diff/5001/third_party/cacheinvalidat... File third_party/cacheinvalidation/overrides/google/cacheinvalidation/deps/random.h (right): https://codereview.chromium.org/14822002/diff/5001/third_party/cacheinvalidat... third_party/cacheinvalidation/overrides/google/cacheinvalidation/deps/random.h:25: return base::RandUint64(); On 2013/05/03 17:20:43, rlarocque wrote: > The Clang style-checked would normally reject this. See > http://www.chromium.org/developers/coding-style/chromium-style-checker-errors... > . > > It seems that the style-checker isn't being run over this file, otherwise you > would have already run into problems with the RandDouble() function. > > You probably should fix this sooner or later, but I won't hold up the review for > it. Yeah, let's address that in a follow-on CL. This is apparently blocking Android from rolling forward.
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_p...
On 2013/05/06 20:13:51, I haz the power (commit-bot) wrote: > Retried try job too often on chromium_presubmit for step(s) presubmit > http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_p... Looks like they've added stronger enforcement of OWNERS rules. According to third_party/OWNERS, you need to TBR= one of brettw@, cpu@, or darin@. See also: http://www.chromium.org/developers/testing/commit-queue#TOC-Sending-a-TBR-pat...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ghc@google.com/14822002/5001
Retried try job too often on ios_dbg_simulator for step(s) base_unittests, compile, content_unittests, crypto_unittests, googleurl_unittests, media_unittests, net_unittests, sql_unittests, ui_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=ios_dbg_si...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ghc@google.com/14822002/5001
Retried try job too often on ios_dbg_simulator for step(s) base_unittests, compile, content_unittests, crypto_unittests, googleurl_unittests, media_unittests, net_unittests, sql_unittests, ui_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=ios_dbg_si...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ghc@google.com/14822002/5001
Retried try job too often on ios_rel_device for step(s) compile http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=ios_rel_de...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ghc@google.com/14822002/5001
Message was sent while issue was closed.
Change committed as 198756
Message was sent while issue was closed.
On 2013/05/07 17:34:24, I haz the power (commit-bot) wrote: > Change committed as 198756 Patch set 2 was the one that was committed. Please ignore Patch set 3 and 4. |
