Chromium Code Reviews| Index: ui/display/types/display_snapshot.cc |
| diff --git a/ui/display/types/display_snapshot.cc b/ui/display/types/display_snapshot.cc |
| index 30e3ea890b222629157b77909162748dedb7f6a1..6d764f7e3a24af7d92db7f096ad2edcff30395fd 100644 |
| --- a/ui/display/types/display_snapshot.cc |
| +++ b/ui/display/types/display_snapshot.cc |
| @@ -15,6 +15,7 @@ DisplaySnapshot::DisplaySnapshot(int64_t display_id, |
| std::string display_name, |
| const base::FilePath& sys_path, |
| const std::vector<const DisplayMode*>& modes, |
| + const std::vector<uint8_t>& edid, |
| const DisplayMode* current_mode, |
| const DisplayMode* native_mode) |
| : display_id_(display_id), |
| @@ -26,9 +27,17 @@ DisplaySnapshot::DisplaySnapshot(int64_t display_id, |
| display_name_(display_name), |
| sys_path_(sys_path), |
| modes_(modes), |
| + edid_(edid), |
| current_mode_(current_mode), |
| native_mode_(native_mode), |
| - product_id_(kInvalidProductID) {} |
| + product_id_(kInvalidProductID) { |
| + if (edid_.size() == 128U) { |
|
dnicoara
2016/02/02 20:43:50
You must handle the case when the size isn't 128.
afakhry
2016/02/05 16:47:52
Done.
|
| + // We must explicitly clear out the bytes that represent the serial number. |
| + // bytes 12-15. |
| + for (int i = 12; i <= 15; ++i) |
|
oshima
2016/02/02 20:27:17
define const for the position and length, with ref
afakhry
2016/02/05 16:47:52
Done.
|
| + edid_[i] = 0; |
| + } |
| +} |
| DisplaySnapshot::~DisplaySnapshot() {} |