Chromium Code Reviews| Index: ui/base/resource/data_pack.cc |
| diff --git a/ui/base/resource/data_pack.cc b/ui/base/resource/data_pack.cc |
| index 0fa97a83bd03104425edc2ae2d96b2647cabc2f7..81f87e9e6a1a2dfa05f17817d90564c0af00adca 100644 |
| --- a/ui/base/resource/data_pack.cc |
| +++ b/ui/base/resource/data_pack.cc |
| @@ -145,6 +145,11 @@ bool DataPack::Load(const FilePath& path) { |
| return true; |
| } |
| +bool DataPack::HasResource(uint16 resource_id) const { |
| + return !!bsearch(&resource_id, mmap_->data() + kHeaderLength, resource_count_, |
|
tony
2012/05/11 21:22:03
Nit: The !! isn't necessary unless you think it im
flackr
2012/05/11 21:59:07
The win_rel try bot complained about casting void*
|
| + sizeof(DataPackEntry), DataPackEntry::CompareById); |
| +} |
| + |
| bool DataPack::GetStringPiece(uint16 resource_id, |
| base::StringPiece* data) const { |
| // It won't be hard to make this endian-agnostic, but it's not worth |