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

Side by Side Diff: content/common/font_list_mac.mm

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 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
« no previous file with comments | « content/common/common_param_traits_unittest.cc ('k') | content/common/font_list_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/common/font_list.h" 5 #include "content/common/font_list.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/mac/scoped_nsautorelease_pool.h" 9 #include "base/mac/scoped_nsautorelease_pool.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 16 matching lines...) Expand all
27 27
28 // Sort family names based on localized names. 28 // Sort family names based on localized names.
29 NSArray* sortedFonts = [fonts_dict 29 NSArray* sortedFonts = [fonts_dict
30 keysSortedByValueUsingSelector:@selector(localizedStandardCompare:)]; 30 keysSortedByValueUsingSelector:@selector(localizedStandardCompare:)];
31 31
32 for (NSString* family_name in sortedFonts) { 32 for (NSString* family_name in sortedFonts) {
33 NSString* localized_family_name = fonts_dict[family_name]; 33 NSString* localized_family_name = fonts_dict[family_name];
34 base::ListValue* font_item = new base::ListValue(); 34 base::ListValue* font_item = new base::ListValue();
35 base::string16 family = base::SysNSStringToUTF16(family_name); 35 base::string16 family = base::SysNSStringToUTF16(family_name);
36 base::string16 loc_family = base::SysNSStringToUTF16(localized_family_name); 36 base::string16 loc_family = base::SysNSStringToUTF16(localized_family_name);
37 font_item->Append(new base::StringValue(family)); 37 font_item->Append(new base::Value(family));
38 font_item->Append(new base::StringValue(loc_family)); 38 font_item->Append(new base::Value(loc_family));
39 font_list->Append(font_item); 39 font_list->Append(font_item);
40 } 40 }
41 41
42 return font_list; 42 return font_list;
43 } 43 }
44 44
45 } // namespace content 45 } // namespace content
OLDNEW
« no previous file with comments | « content/common/common_param_traits_unittest.cc ('k') | content/common/font_list_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698