summaryrefslogtreecommitdiffstats
path: root/base/rand_util_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* ake string_util::WriteInto() DCHECK() that the supplied |length_with_null| > ↵pkasting@chromium.org2011-11-291-2/+2
| | | | | | | | | | | | 1, meaning that the without-'\0' string is non-empty. This replaces the conditional code added recently that makes this case return NULL. It's easier to understand if it's simply an error to call WriteInto() in this case at all. Add DCHECK()s or conditionals as appropriate to callers in order to ensure this assertion holds. BUG=none TEST=none Review URL: http://codereview.chromium.org/8418034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112005 0039d316-1c4b-4281-b951-d872f2087c98
* Fix variable names and comments in RandGenerator.dilmah@chromium.org2011-08-241-7/+6
| | | | | | | | | | | | (No semantic change intended). BUG=None TEST=None Review URL: http://codereview.chromium.org/7685053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98098 0039d316-1c4b-4281-b951-d872f2087c98
* Fix base::RandGenerator bug (it had non-uniform random distribution). Add ↵joi@chromium.org2011-05-301-0/+60
| | | | | | | | | | | test that would have caught bug. Also add a test to verify that our random generators are at least somewhat random. BUG=84221 TEST=base_unittests --gtest_filter=RandUtilTest.* Review URL: http://codereview.chromium.org/7080005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87244 0039d316-1c4b-4281-b951-d872f2087c98
* Move crypto_helpers from sync to cryptoqsr@google.com2011-05-051-0/+13
| | | | | | | | | | | | | crypto_helpers only depends on resources in base and is used by sync and password_manager. BUG= TEST= Review URL: http://codereview.chromium.org/6873156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84223 0039d316-1c4b-4281-b951-d872f2087c98
* Add a rand_util method for generating a random string.abarth@chromium.org2011-04-291-5/+18
| | | | | | | | We need this function to generate a nonce for MAC cookies. Review URL: http://codereview.chromium.org/6904118 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83588 0039d316-1c4b-4281-b951-d872f2087c98
* Moving GUID generation from base to chrome/browser/guid*dhollowa@chromium.org2010-10-141-47/+0
| | | | | | | | | | | Moves GUID generation into chrome/browser/guid*. GUID generation is used only within chrome/browser. So am moving it there. BUG=58813 TEST=GUIDTest.GUIDGeneratesAllZeroes, GUIDTest.GUIDGeneratesCorrectly, GUIDTest.GUIDCorrectlyFormatted, MetricsServiceTest.ClientIdCorrectlyFormatted Review URL: http://codereview.chromium.org/3800003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62639 0039d316-1c4b-4281-b951-d872f2087c98
* Factoring GUID generation from metrics to basedhollowa@chromium.org2010-10-131-0/+47
| | | | | | | | | | | Factors GUID generation into base/rand_util. The Autofill feature is in need of this utility so am factoring GUID generation out of metrics and moving to the commons. BUG=58813 TEST=RandUtilTest.GUIDGeneratesAllZeroes, RandUtilTest.GUIDGeneratesCorrectly, RandUtilTest.GUIDCorrectlyFormatted, MetricsServiceTest.ClientIdCorrectlyFormatted Review URL: http://codereview.chromium.org/3800001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62480 0039d316-1c4b-4281-b951-d872f2087c98
* Add RandomNumberGenerator adapter to base/rand_util.hisherman@chromium.org2010-08-301-0/+8
| | | | | | | | | BUG=46679 TEST=none (yet...) Review URL: http://codereview.chromium.org/3053050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57904 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce RandDouble to one call to ldexp, add one bit of precisionmark@chromium.org2008-09-301-0/+7
| | | | | | Review URL: http://codereview.chromium.org/5801 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2712 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring for portability:mark@chromium.org2008-09-291-0/+22
- Move chrome/common/env_util to base/sys_info - Move chrome/common/rand_util to base/rand_util (new), simplify its public interface, and fix its implementation Patch by Paweł Hajdan, Jr. <phajdan.jr@gmail.com> http://codereview.chromium.org/4079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2697 0039d316-1c4b-4281-b951-d872f2087c98