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/ui/webui/options2/chromeos/user_image_source.h" | 5 #include "chrome/browser/ui/webui/options2/chromeos/user_image_source.h" |
6 | 6 |
7 #include "base/memory/ref_counted_memory.h" | 7 #include "base/memory/ref_counted_memory.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/string_split.h" | 9 #include "base/string_split.h" |
10 #include "chrome/browser/chromeos/login/default_user_images.h" | 10 #include "chrome/browser/chromeos/login/default_user_images.h" |
11 #include "chrome/browser/chromeos/login/user_manager.h" | 11 #include "chrome/browser/chromeos/login/user_manager.h" |
12 #include "chrome/browser/ui/webui/web_ui_util.cc" | 12 #include "chrome/browser/ui/webui/web_ui_util.h" |
Ivan Korotkov
2012/08/15 20:36:03
Ouch.
| |
13 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
14 #include "googleurl/src/url_parse.h" | 14 #include "googleurl/src/url_parse.h" |
15 #include "grit/theme_resources.h" | 15 #include "grit/theme_resources.h" |
16 #include "ui/base/resource/resource_bundle.h" | 16 #include "ui/base/resource/resource_bundle.h" |
17 #include "ui/gfx/codec/png_codec.h" | 17 #include "ui/gfx/codec/png_codec.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 // Animated key is used in user image URL requests to specify that | 21 // Animated key is used in user image URL requests to specify that |
22 // animated version of user image is required. Without that key | 22 // animated version of user image is required. Without that key |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 if (is_image_animated) { | 119 if (is_image_animated) { |
120 const chromeos::User* user = chromeos::UserManager::Get()->FindUser(email); | 120 const chromeos::User* user = chromeos::UserManager::Get()->FindUser(email); |
121 if (user && user->has_animated_image()) | 121 if (user && user->has_animated_image()) |
122 return "image/gif"; | 122 return "image/gif"; |
123 } | 123 } |
124 return "image/png"; | 124 return "image/png"; |
125 } | 125 } |
126 | 126 |
127 } // namespace options2 | 127 } // namespace options2 |
128 } // namespace chromeos | 128 } // namespace chromeos |
OLD | NEW |