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/login/default_user_images.h" | 5 #include "chrome/browser/chromeos/login/default_user_images.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 return *ResourceBundle::GetSharedInstance(). | 141 return *ResourceBundle::GetSharedInstance(). |
142 GetImageSkiaNamed(kDefaultImageResourceIDs[index]); | 142 GetImageSkiaNamed(kDefaultImageResourceIDs[index]); |
143 } | 143 } |
144 | 144 |
145 string16 GetDefaultImageDescription(int index) { | 145 string16 GetDefaultImageDescription(int index) { |
146 DCHECK(index >= 0 && index < kDefaultImagesCount); | 146 DCHECK(index >= 0 && index < kDefaultImagesCount); |
147 int string_id = kDefaultImageDescriptions[index]; | 147 int string_id = kDefaultImageDescriptions[index]; |
148 if (string_id) | 148 if (string_id) |
149 return l10n_util::GetStringUTF16(string_id); | 149 return l10n_util::GetStringUTF16(string_id); |
150 else | 150 else |
151 return string16(); | 151 return base::string16(); |
152 } | 152 } |
153 | 153 |
154 // Resource IDs of default user images. | 154 // Resource IDs of default user images. |
155 const int kDefaultImageResourceIDs[] = { | 155 const int kDefaultImageResourceIDs[] = { |
156 IDR_LOGIN_DEFAULT_USER, | 156 IDR_LOGIN_DEFAULT_USER, |
157 IDR_LOGIN_DEFAULT_USER_1, | 157 IDR_LOGIN_DEFAULT_USER_1, |
158 IDR_LOGIN_DEFAULT_USER_2, | 158 IDR_LOGIN_DEFAULT_USER_2, |
159 IDR_LOGIN_DEFAULT_USER_3, | 159 IDR_LOGIN_DEFAULT_USER_3, |
160 IDR_LOGIN_DEFAULT_USER_4, | 160 IDR_LOGIN_DEFAULT_USER_4, |
161 IDR_LOGIN_DEFAULT_USER_5, | 161 IDR_LOGIN_DEFAULT_USER_5, |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 int GetDefaultImageHistogramValue(int index) { | 277 int GetDefaultImageHistogramValue(int index) { |
278 DCHECK(index >= 0 && index < kDefaultImagesCount); | 278 DCHECK(index >= 0 && index < kDefaultImagesCount); |
279 // Create a gap in histogram values for | 279 // Create a gap in histogram values for |
280 // [kHistogramImageFromCamera..kHistogramImageFromProfile] block to fit. | 280 // [kHistogramImageFromCamera..kHistogramImageFromProfile] block to fit. |
281 if (index < kHistogramImageFromCamera) | 281 if (index < kHistogramImageFromCamera) |
282 return index; | 282 return index; |
283 return index + 6; | 283 return index + 6; |
284 } | 284 } |
285 | 285 |
286 } // namespace chromeos | 286 } // namespace chromeos |
OLD | NEW |