| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/history/core/test/thumbnail.h" | 5 #include "components/history/core/test/thumbnail.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" |
| 7 #include "components/history/core/test/thumbnail-inl.h" | 8 #include "components/history/core/test/thumbnail-inl.h" |
| 8 #include "third_party/skia/include/core/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" |
| 9 #include "ui/gfx/codec/jpeg_codec.h" | 10 #include "ui/gfx/codec/jpeg_codec.h" |
| 10 #include "ui/gfx/image/image.h" | 11 #include "ui/gfx/image/image.h" |
| 11 | 12 |
| 12 namespace history { | 13 namespace history { |
| 13 | 14 |
| 14 gfx::Image CreateGoogleThumbnailForTest() { | 15 gfx::Image CreateGoogleThumbnailForTest() { |
| 15 // Returned image takes ownership of decoded SkBitmap. | 16 // Returned image takes ownership of decoded SkBitmap. |
| 16 scoped_ptr<SkBitmap> thumbnail_bitmap( | 17 scoped_ptr<SkBitmap> thumbnail_bitmap( |
| 17 gfx::JPEGCodec::Decode(kGoogleThumbnail, sizeof(kGoogleThumbnail))); | 18 gfx::JPEGCodec::Decode(kGoogleThumbnail, sizeof(kGoogleThumbnail))); |
| 18 return gfx::Image::CreateFrom1xBitmap(*thumbnail_bitmap); | 19 return gfx::Image::CreateFrom1xBitmap(*thumbnail_bitmap); |
| 19 } | 20 } |
| 20 | 21 |
| 21 } // namespace | 22 } // namespace |
| OLD | NEW |