diff options
author | glevin <glevin@chromium.org> | 2015-09-03 11:11:57 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-03 18:12:33 +0000 |
commit | 58903846bb9715897ea16296a03f8b60e5308de3 (patch) | |
tree | f63a57881e6d75164c7dbc83cb89eac968a076b3 /ash | |
parent | 30a92f969db1ea52cc16883783415dfde7a60189 (diff) | |
download | chromium_src-58903846bb9715897ea16296a03f8b60e5308de3.zip chromium_src-58903846bb9715897ea16296a03f8b60e5308de3.tar.gz chromium_src-58903846bb9715897ea16296a03f8b60e5308de3.tar.bz2 |
Don't try to load non-existent icc file
BUG=525803
Most displays don't currently have an icc file. Without this CL, we
were hitting an inappropriate LOG(WARNING) in ParseFile().
Fix revert of https://codereview.chromium.org/1302273006/ :
Move PathExists() to ParseFile() (IO thread)
Review URL: https://codereview.chromium.org/1323303003
Cr-Commit-Position: refs/heads/master@{#347192}
Diffstat (limited to 'ash')
-rw-r--r-- | ash/content/display/display_color_manager_chromeos.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ash/content/display/display_color_manager_chromeos.cc b/ash/content/display/display_color_manager_chromeos.cc index b185dc9..3c679db 100644 --- a/ash/content/display/display_color_manager_chromeos.cc +++ b/ash/content/display/display_color_manager_chromeos.cc @@ -8,6 +8,7 @@ #include "base/bind_helpers.h" #include "base/command_line.h" #include "base/files/file_path.h" +#include "base/files/file_util.h" #include "base/format_macros.h" #include "base/logging.h" #include "base/path_service.h" @@ -31,6 +32,8 @@ namespace { bool ParseFile(const base::FilePath& path, DisplayColorManager::ColorCalibrationData* data) { + if (!base::PathExists(path)) // No icc file for this display; not an error. + return false; qcms_profile* display_profile = qcms_profile_from_path(path.value().c_str()); if (!display_profile) { |