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

Side by Side Diff: chrome/browser/profiles/profile_info_cache.cc

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 years, 9 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/profiles/profile_info_cache.h" 5 #include "chrome/browser/profiles/profile_info_cache.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/i18n/case_conversion.h" 10 #include "base/i18n/case_conversion.h"
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 703
704 // static 704 // static
705 int ProfileInfoCache::GetDefaultAvatarIconResourceIDAtIndex(size_t index) { 705 int ProfileInfoCache::GetDefaultAvatarIconResourceIDAtIndex(size_t index) {
706 DCHECK(IsDefaultAvatarIconIndex(index)); 706 DCHECK(IsDefaultAvatarIconIndex(index));
707 return kDefaultAvatarIconResources[index]; 707 return kDefaultAvatarIconResources[index];
708 } 708 }
709 709
710 // static 710 // static
711 std::string ProfileInfoCache::GetDefaultAvatarIconUrl(size_t index) { 711 std::string ProfileInfoCache::GetDefaultAvatarIconUrl(size_t index) {
712 DCHECK(IsDefaultAvatarIconIndex(index)); 712 DCHECK(IsDefaultAvatarIconIndex(index));
713 return StringPrintf("%s%" PRIuS, kDefaultUrlPrefix, index); 713 return base::StringPrintf("%s%" PRIuS, kDefaultUrlPrefix, index);
714 } 714 }
715 715
716 // static 716 // static
717 bool ProfileInfoCache::IsDefaultAvatarIconIndex(size_t index) { 717 bool ProfileInfoCache::IsDefaultAvatarIconIndex(size_t index) {
718 return index < kDefaultAvatarIconsCount; 718 return index < kDefaultAvatarIconsCount;
719 } 719 }
720 720
721 // static 721 // static
722 bool ProfileInfoCache::IsDefaultAvatarIconUrl(const std::string& url, 722 bool ProfileInfoCache::IsDefaultAvatarIconUrl(const std::string& url,
723 size_t* icon_index) { 723 size_t* icon_index) {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 info->GetString(kNameKey, &name); 818 info->GetString(kNameKey, &name);
819 names.push_back(name); 819 names.push_back(name);
820 } 820 }
821 return names; 821 return names;
822 } 822 }
823 823
824 // static 824 // static
825 void ProfileInfoCache::RegisterPrefs(PrefRegistrySimple* registry) { 825 void ProfileInfoCache::RegisterPrefs(PrefRegistrySimple* registry) {
826 registry->RegisterDictionaryPref(prefs::kProfileInfoCache); 826 registry->RegisterDictionaryPref(prefs::kProfileInfoCache);
827 } 827 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698