| 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..e1d8c144ac54ec21c7f3448c3f9b34a6b713d659 100644
|
| --- a/ui/base/resource/data_pack.cc
|
| +++ b/ui/base/resource/data_pack.cc
|
| @@ -61,7 +61,7 @@ enum LoadErrors {
|
|
|
| namespace ui {
|
|
|
| -DataPack::DataPack(float scale_factor)
|
| +DataPack::DataPack(ui::ScaleFactor scale_factor)
|
| : resource_count_(0),
|
| text_encoding_type_(BINARY),
|
| scale_factor_(scale_factor) {
|
| @@ -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_,
|
| + 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
|
| @@ -186,7 +191,7 @@ ResourceHandle::TextEncodingType DataPack::GetTextEncodingType() const {
|
| return text_encoding_type_;
|
| }
|
|
|
| -float DataPack::GetScaleFactor() const {
|
| +ui::ScaleFactor DataPack::GetScaleFactor() const {
|
| return scale_factor_;
|
| }
|
|
|
|
|