OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "ui/gfx/color_profile.h" | 5 #include "ui/gfx/color_profile.h" |
6 | 6 |
| 7 #include <windows.h> |
7 #include <map> | 8 #include <map> |
8 #include <windows.h> | |
9 | 9 |
10 #include "base/file_util.h" | 10 #include "base/files/file_util.h" |
11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
13 | 13 |
14 namespace gfx { | 14 namespace gfx { |
15 | 15 |
16 class ColorProfileCache { | 16 class ColorProfileCache { |
17 public: | 17 public: |
18 // A thread-safe cache of color profiles keyed by windows device name. | 18 // A thread-safe cache of color profiles keyed by windows device name. |
19 ColorProfileCache() {} | 19 ColorProfileCache() {} |
20 | 20 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 std::string profileData; | 112 std::string profileData; |
113 if (!base::ReadFileToString(base::FilePath(path), &profileData)) | 113 if (!base::ReadFileToString(base::FilePath(path), &profileData)) |
114 return; | 114 return; |
115 size_t length = profileData.size(); | 115 size_t length = profileData.size(); |
116 if (gfx::InvalidColorProfileLength(length)) | 116 if (gfx::InvalidColorProfileLength(length)) |
117 return; | 117 return; |
118 profile->assign(profileData.data(), profileData.data() + length); | 118 profile->assign(profileData.data(), profileData.data() + length); |
119 } | 119 } |
120 | 120 |
121 } // namespace gfx | 121 } // namespace gfx |
OLD | NEW |