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

Unified Diff: ui/gfx/color_profile.cc

Issue 1796293003: Image decode color: Push color profile from browser to renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: leave empty check Created 4 years, 6 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
« no previous file with comments | « ui/gfx/color_profile.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_profile.cc
diff --git a/ui/gfx/color_profile.cc b/ui/gfx/color_profile.cc
index 42d6967a056a4161d54e75fca80b4a8d78cba635..3f6e60ff85898a053d9ec83cdeb53c6878eb6a03 100644
--- a/ui/gfx/color_profile.cc
+++ b/ui/gfx/color_profile.cc
@@ -12,6 +12,12 @@ static const size_t kMinProfileLength = 128;
static const size_t kMaxProfileLength = 4 * 1024 * 1024;
}
+ColorProfile::ColorProfile(const std::vector<char>& profile)
+ : profile_(profile) {
+ if (!IsValidProfileLength(profile_.size()))
+ profile_.clear();
+}
+
ColorProfile::ColorProfile() = default;
ColorProfile::ColorProfile(ColorProfile&& other) = default;
ColorProfile::ColorProfile(const ColorProfile& other) = default;
« no previous file with comments | « ui/gfx/color_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698