Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: chrome/browser/chromeos/login/users/avatar/user_image.cc

Issue 286933002: [cros login] Split login related classes into subfolders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix includes in new tests Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/login/user_image.h" 5 #include "chrome/browser/chromeos/login/users/avatar/user_image.h"
6 6
7 #include "base/debug/trace_event.h"
7 #include "third_party/skia/include/core/SkBitmap.h" 8 #include "third_party/skia/include/core/SkBitmap.h"
8 #include "ui/gfx/codec/jpeg_codec.h" 9 #include "ui/gfx/codec/jpeg_codec.h"
9 10
10 #include "base/debug/trace_event.h"
11
12 namespace chromeos { 11 namespace chromeos {
13 12
14 namespace { 13 namespace {
15 14
16 // Default quality for encoding user images. 15 // Default quality for encoding user images.
17 const int kDefaultEncodingQuality = 90; 16 const int kDefaultEncodingQuality = 90;
18 17
19 bool IsAnimatedImage(const UserImage::RawImage& data) { 18 bool IsAnimatedImage(const UserImage::RawImage& data) {
20 const char kGIFStamp[] = "GIF"; 19 const char kGIFStamp[] = "GIF";
21 const size_t kGIFStampLength = sizeof(kGIFStamp) - 1; 20 const size_t kGIFStampLength = sizeof(kGIFStamp) - 1;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 92
94 void UserImage::DiscardRawImage() { 93 void UserImage::DiscardRawImage() {
95 RawImage().swap(raw_image_); // Clear |raw_image_|. 94 RawImage().swap(raw_image_); // Clear |raw_image_|.
96 } 95 }
97 96
98 void UserImage::MarkAsSafe() { 97 void UserImage::MarkAsSafe() {
99 is_safe_format_ = true; 98 is_safe_format_ = true;
100 } 99 }
101 100
102 } // namespace chromeos 101 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698