| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/contacts/contact_test_util.h" | 5 #include "chrome/browser/chromeos/contacts/contact_test_util.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/string_util.h" | |
| 13 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
| 13 #include "base/strings/string_util.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "chrome/browser/chromeos/contacts/contact_map.h" | 15 #include "chrome/browser/chromeos/contacts/contact_map.h" |
| 16 #include "third_party/skia/include/core/SkBitmap.h" | 16 #include "third_party/skia/include/core/SkBitmap.h" |
| 17 #include "third_party/skia/include/core/SkCanvas.h" | 17 #include "third_party/skia/include/core/SkCanvas.h" |
| 18 #include "ui/gfx/codec/png_codec.h" | 18 #include "ui/gfx/codec/png_codec.h" |
| 19 #include "ui/gfx/size.h" | 19 #include "ui/gfx/size.h" |
| 20 | 20 |
| 21 namespace contacts { | 21 namespace contacts { |
| 22 namespace test { | 22 namespace test { |
| 23 | 23 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 SkCanvas canvas(bitmap); | 246 SkCanvas canvas(bitmap); |
| 247 canvas.clear(SK_ColorBLACK); | 247 canvas.clear(SK_ColorBLACK); |
| 248 | 248 |
| 249 std::vector<unsigned char> png_photo; | 249 std::vector<unsigned char> png_photo; |
| 250 CHECK(gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, false, &png_photo)); | 250 CHECK(gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, false, &png_photo)); |
| 251 contact->set_raw_untrusted_photo(&png_photo[0], png_photo.size()); | 251 contact->set_raw_untrusted_photo(&png_photo[0], png_photo.size()); |
| 252 } | 252 } |
| 253 | 253 |
| 254 } // namespace test | 254 } // namespace test |
| 255 } // namespace contacts | 255 } // namespace contacts |
| OLD | NEW |