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

Unified Diff: ui/gfx/icc_profile.h

Issue 2663153002: Fix id tracking bug in ICCProfile (Closed)
Patch Set: Created 3 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: ui/gfx/icc_profile.h
diff --git a/ui/gfx/icc_profile.h b/ui/gfx/icc_profile.h
index c6170c61aadde79e2ded3c55afc767cfaa16c680..c0c4099083c41a4b1602debe143c0068db280266 100644
--- a/ui/gfx/icc_profile.h
+++ b/ui/gfx/icc_profile.h
@@ -68,6 +68,22 @@ class GFX_EXPORT ICCProfile {
#endif
private:
+ friend ICCProfile ICCProfileForTestingAdobeRGB();
+ friend ICCProfile ICCProfileForTestingColorSpin();
+ friend ICCProfile ICCProfileForTestingGenericRGB();
+ friend ICCProfile ICCProfileForTestingSRGB();
+ static const uint64_t test_id_adobe_rgb_;
+ static const uint64_t test_id_color_spin_;
+ static const uint64_t test_id_generic_rgb_;
+ static const uint64_t test_id_srgb_;
+
+ // This method is used to hard-code the |id_| to a specific value, and is
+ // used by test methods to ensure that they don't conflict with the values
+ // generated in the browser.
+ static ICCProfile FromDataWithId(const void* icc_profile,
+ size_t size,
+ uint64_t id);
+
// TODO(ccameron): Remove this function once its callerrs are gone.
static ICCProfile FromSkColorSpace(sk_sp<SkColorSpace> color_space);
static bool IsValidProfileLength(size_t length);

Powered by Google App Engine
This is Rietveld 408576698