| Index: ui/gfx/image/image.cc
|
| diff --git a/ui/gfx/image/image.cc b/ui/gfx/image/image.cc
|
| index a3acc5420158374406db8b4b9b712bbd7b9f1f02..d9e51e87b3cebc044563b694c7847e9d3e2f6c73 100644
|
| --- a/ui/gfx/image/image.cc
|
| +++ b/ui/gfx/image/image.cc
|
| @@ -8,7 +8,6 @@
|
| #include <set>
|
|
|
| #include "base/logging.h"
|
| -#include "base/stl_util.h"
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
| #include "ui/gfx/geometry/size.h"
|
| #include "ui/gfx/image/image_png_rep.h"
|
| @@ -340,12 +339,13 @@ class ImageRepCocoa : public ImageRep {
|
| class ImageStorage : public base::RefCounted<ImageStorage> {
|
| public:
|
| ImageStorage(Image::RepresentationType default_type)
|
| - : default_representation_type_(default_type),
|
| + : default_representation_type_(default_type)
|
| #if defined(OS_MACOSX) && !defined(OS_IOS)
|
| + ,
|
| default_representation_color_space_(
|
| - base::mac::GetGenericRGBColorSpace()),
|
| + base::mac::GetGenericRGBColorSpace())
|
| #endif // defined(OS_MACOSX) && !defined(OS_IOS)
|
| - representations_deleter_(&representations_) {
|
| + {
|
| }
|
|
|
| Image::RepresentationType default_representation_type() {
|
| @@ -383,8 +383,6 @@ class ImageStorage : public base::RefCounted<ImageStorage> {
|
| // more for any converted representations.
|
| Image::RepresentationMap representations_;
|
|
|
| - STLValueDeleter<Image::RepresentationMap> representations_deleter_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(ImageStorage);
|
| };
|
|
|
| @@ -739,7 +737,8 @@ Image::RepresentationType Image::DefaultRepresentationType() const {
|
| internal::ImageRep* Image::GetRepresentation(
|
| RepresentationType rep_type, bool must_exist) const {
|
| CHECK(storage_.get());
|
| - RepresentationMap::iterator it = storage_->representations().find(rep_type);
|
| + RepresentationMap::const_iterator it =
|
| + storage_->representations().find(rep_type);
|
| if (it == storage_->representations().end()) {
|
| CHECK(!must_exist);
|
| return NULL;
|
| @@ -750,7 +749,7 @@ internal::ImageRep* Image::GetRepresentation(
|
| void Image::AddRepresentation(scoped_ptr<internal::ImageRep> rep) const {
|
| CHECK(storage_.get());
|
| RepresentationType type = rep->type();
|
| - storage_->representations().insert(std::make_pair(type, rep.release()));
|
| + storage_->representations().insert(type, rep.Pass());
|
| }
|
|
|
| } // namespace gfx
|
|
|