Index: components/user_manager/avatar/user_image.cc |
diff --git a/chrome/browser/chromeos/login/users/avatar/user_image.cc b/components/user_manager/avatar/user_image.cc |
similarity index 84% |
rename from chrome/browser/chromeos/login/users/avatar/user_image.cc |
rename to components/user_manager/avatar/user_image.cc |
index 4613238434df2ff0bc1bac4e17841895d2b036df..0b6aea910401c3149bbab5637a0cadb19878a792 100644 |
--- a/chrome/browser/chromeos/login/users/avatar/user_image.cc |
+++ b/components/user_manager/avatar/user_image.cc |
@@ -2,13 +2,13 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/browser/chromeos/login/users/avatar/user_image.h" |
+#include "components/user_manager/avatar/user_image.h" |
#include "base/debug/trace_event.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
#include "ui/gfx/codec/jpeg_codec.h" |
-namespace chromeos { |
+namespace user_manager { |
namespace { |
@@ -28,8 +28,12 @@ bool IsAnimatedImage(const UserImage::RawImage& data) { |
bool EncodeImageSkia(const gfx::ImageSkia& image, |
std::vector<unsigned char>* output) { |
- TRACE_EVENT2("oobe", "EncodeImageSkia", |
- "width", image.width(), "height", image.height()); |
+ TRACE_EVENT2("oobe", |
+ "EncodeImageSkia", |
+ "width", |
+ image.width(), |
+ "height", |
+ image.height()); |
if (image.isNull()) |
return false; |
const SkBitmap& bitmap = *image.bitmap(); |
@@ -40,7 +44,8 @@ bool EncodeImageSkia(const gfx::ImageSkia& image, |
bitmap.width(), |
bitmap.height(), |
bitmap.width() * bitmap.bytesPerPixel(), |
- kDefaultEncodingQuality, output); |
+ kDefaultEncodingQuality, |
+ output); |
} |
} // namespace |
@@ -69,8 +74,7 @@ UserImage::UserImage(const gfx::ImageSkia& image) |
is_safe_format_(false) { |
} |
-UserImage::UserImage(const gfx::ImageSkia& image, |
- const RawImage& raw_image) |
+UserImage::UserImage(const gfx::ImageSkia& image, const RawImage& raw_image) |
: image_(image), |
has_raw_image_(false), |
has_animated_image_(false), |
@@ -88,7 +92,8 @@ UserImage::UserImage(const gfx::ImageSkia& image, |
} |
} |
-UserImage::~UserImage() {} |
+UserImage::~UserImage() { |
+} |
void UserImage::DiscardRawImage() { |
RawImage().swap(raw_image_); // Clear |raw_image_|. |
@@ -98,4 +103,4 @@ void UserImage::MarkAsSafe() { |
is_safe_format_ = true; |
} |
-} // namespace chromeos |
+} // namespace user_manager |