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

Side by Side Diff: third_party/WebKit/Source/web/ImageDecodeBench.cpp

Issue 1419293005: Add assertions that the empty Platform::cryptographicallyRandomValues() overrides are not being use… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to RELEASE_ASSERT and use base::RandBytes() in Chromium. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifdef WTF 5 #ifdef WTF
6 6
7 Provides a minimal wrapping of the Blink image decoders. Used to perform 7 Provides a minimal wrapping of the Blink image decoders. Used to perform
8 a non-threaded, memory-to-memory image decode using micro second accuracy 8 a non-threaded, memory-to-memory image decode using micro second accuracy
9 clocks to measure image decode time. Optionally applies color correction 9 clocks to measure image decode time. Optionally applies color correction
10 during image decoding on supported platforms (default off). Usage: 10 during image decoding on supported platforms (default off). Usage:
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 362
363 class WebPlatform : public blink::Platform { 363 class WebPlatform : public blink::Platform {
364 public: 364 public:
365 const unsigned char* getTraceCategoryEnabledFlag(const char*) override 365 const unsigned char* getTraceCategoryEnabledFlag(const char*) override
366 { 366 {
367 return reinterpret_cast<const unsigned char *>("nope-none-nada"); 367 return reinterpret_cast<const unsigned char *>("nope-none-nada");
368 } 368 }
369 369
370 void cryptographicallyRandomValues(unsigned char*, size_t) override 370 void cryptographicallyRandomValues(unsigned char*, size_t) override
371 { 371 {
372 // Do nothing: make blink::Platform use the default crypto-randoms. 372 RELEASE_ASSERT_NOT_REACHED();
373 } 373 }
374 374
375 void screenColorProfile(WebVector<char>* profile) override 375 void screenColorProfile(WebVector<char>* profile) override
376 { 376 {
377 getScreenColorProfile(profile); // Returns a whacked color profile. 377 getScreenColorProfile(profile); // Returns a whacked color profile.
378 } 378 }
379 }; 379 };
380 380
381 blink::initializeWithoutV8(new WebPlatform()); 381 blink::initializeWithoutV8(new WebPlatform());
382 382
(...skipping 28 matching lines...) Expand all
411 exit(3); 411 exit(3);
412 } 412 }
413 } 413 }
414 414
415 // Results to stdout. 415 // Results to stdout.
416 416
417 double averageTime = totalTime / static_cast<double>(iterations); 417 double averageTime = totalTime / static_cast<double>(iterations);
418 printf("%f %f\n", totalTime, averageTime); 418 printf("%f %f\n", totalTime, averageTime);
419 return 0; 419 return 0;
420 } 420 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698