| Index: ui/gfx/icc_profile_x11.cc | 
| diff --git a/ui/gfx/icc_profile_x11.cc b/ui/gfx/icc_profile_x11.cc | 
| index 21ae82c20cb20c8679da66272662a26c915e590c..8bcd51e6fb911783b81caf655680926491d7c5ce 100644 | 
| --- a/ui/gfx/icc_profile_x11.cc | 
| +++ b/ui/gfx/icc_profile_x11.cc | 
| @@ -9,8 +9,9 @@ extern "C" { | 
| #include <X11/Xlib.h> | 
| } | 
|  | 
| +#include "base/command_line.h" | 
| #include "ui/gfx/icc_profile.h" | 
| - | 
| +#include "ui/gfx/switches.h" | 
| #include "ui/gfx/x/x11_types.h" | 
|  | 
| namespace gfx { | 
| @@ -18,6 +19,8 @@ namespace gfx { | 
| // static | 
| ICCProfile ICCProfile::FromBestMonitor() { | 
| ICCProfile icc_profile; | 
| +  if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kHeadless)) | 
| +    return icc_profile; | 
| Atom property = XInternAtom(GetXDisplay(), "_ICC_PROFILE", true); | 
| if (property != None) { | 
| Atom prop_type = None; | 
|  |