OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/users/chrome_user_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cstddef> | 9 #include <cstddef> |
10 #include <set> | 10 #include <set> |
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1346 base::string16 ChromeUserManagerImpl::GetResourceStringUTF16( | 1346 base::string16 ChromeUserManagerImpl::GetResourceStringUTF16( |
1347 int string_id) const { | 1347 int string_id) const { |
1348 return l10n_util::GetStringUTF16(string_id); | 1348 return l10n_util::GetStringUTF16(string_id); |
1349 } | 1349 } |
1350 | 1350 |
1351 void ChromeUserManagerImpl::ScheduleResolveLocale( | 1351 void ChromeUserManagerImpl::ScheduleResolveLocale( |
1352 const std::string& locale, | 1352 const std::string& locale, |
1353 const base::Closure& on_resolved_callback, | 1353 const base::Closure& on_resolved_callback, |
1354 std::string* out_resolved_locale) const { | 1354 std::string* out_resolved_locale) const { |
1355 base::PostTaskWithTraitsAndReply( | 1355 base::PostTaskWithTraitsAndReply( |
1356 FROM_HERE, base::TaskTraits().MayBlock().WithPriority( | 1356 FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND}, |
1357 base::TaskPriority::BACKGROUND), | |
1358 base::Bind(ResolveLocale, locale, base::Unretained(out_resolved_locale)), | 1357 base::Bind(ResolveLocale, locale, base::Unretained(out_resolved_locale)), |
1359 on_resolved_callback); | 1358 on_resolved_callback); |
1360 } | 1359 } |
1361 | 1360 |
1362 bool ChromeUserManagerImpl::IsValidDefaultUserImageId(int image_index) const { | 1361 bool ChromeUserManagerImpl::IsValidDefaultUserImageId(int image_index) const { |
1363 return image_index >= 0 && | 1362 return image_index >= 0 && |
1364 image_index < chromeos::default_user_image::kDefaultImagesCount; | 1363 image_index < chromeos::default_user_image::kDefaultImagesCount; |
1365 } | 1364 } |
1366 | 1365 |
1367 std::unique_ptr<user_manager::User> | 1366 std::unique_ptr<user_manager::User> |
(...skipping 13 matching lines...) Expand all Loading... |
1381 break; | 1380 break; |
1382 default: | 1381 default: |
1383 NOTREACHED(); | 1382 NOTREACHED(); |
1384 break; | 1383 break; |
1385 } | 1384 } |
1386 | 1385 |
1387 return user; | 1386 return user; |
1388 } | 1387 } |
1389 | 1388 |
1390 } // namespace chromeos | 1389 } // namespace chromeos |
OLD | NEW |