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

Side by Side Diff: chrome/tools/mac_helpers/infoplist_strings_util.mm

Issue 94013004: Add base:: to string16s in chrome/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try again Created 7 years 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 // Helper tool that is built and run during a build to pull strings from 5 // Helper tool that is built and run during a build to pull strings from
6 // the GRD files and generate the InfoPlist.strings files needed for 6 // the GRD files and generate the InfoPlist.strings files needed for
7 // Mac OS X app bundles. 7 // Mac OS X app bundles.
8 8
9 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
10 10
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 NSString* short_name = 249 NSString* short_name =
250 LoadStringFromDataPack(branded_data_pack.get(), cur_lang, 250 LoadStringFromDataPack(branded_data_pack.get(), cur_lang,
251 short_name_id, short_name_id_str); 251 short_name_id, short_name_id_str);
252 NSString* copyright_format = 252 NSString* copyright_format =
253 LoadStringFromDataPack(branded_data_pack.get(), cur_lang, 253 LoadStringFromDataPack(branded_data_pack.get(), cur_lang,
254 IDS_ABOUT_VERSION_COPYRIGHT, 254 IDS_ABOUT_VERSION_COPYRIGHT,
255 "IDS_ABOUT_VERSION_COPYRIGHT"); 255 "IDS_ABOUT_VERSION_COPYRIGHT");
256 256
257 base::Time::Exploded exploded_time; 257 base::Time::Exploded exploded_time;
258 base::Time::Now().LocalExplode(&exploded_time); 258 base::Time::Now().LocalExplode(&exploded_time);
259 std::vector<string16> replacements; 259 std::vector<base::string16> replacements;
260 replacements.push_back(base::IntToString16(exploded_time.year)); 260 replacements.push_back(base::IntToString16(exploded_time.year));
261 NSString* copyright = base::SysUTF16ToNSString( 261 NSString* copyright = base::SysUTF16ToNSString(
262 ReplaceStringPlaceholders(base::SysNSStringToUTF16(copyright_format), 262 ReplaceStringPlaceholders(base::SysNSStringToUTF16(copyright_format),
263 replacements, 263 replacements,
264 NULL)); 264 NULL));
265 265
266 // For now, assume this is ok for all languages. If we need to, this could 266 // For now, assume this is ok for all languages. If we need to, this could
267 // be moved into generated_resources.grd and fetched. 267 // be moved into generated_resources.grd and fetched.
268 NSString *get_info = [NSString stringWithFormat:@"%@ %@, %@", 268 NSString *get_info = [NSString stringWithFormat:@"%@ %@, %@",
269 name, version_string, copyright]; 269 name, version_string, copyright];
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 [output_path stringByAppendingPathComponent:@"InfoPlist.strings"]; 322 [output_path stringByAppendingPathComponent:@"InfoPlist.strings"];
323 if (![strings_file_contents_utf8 writeToFile:output_path 323 if (![strings_file_contents_utf8 writeToFile:output_path
324 atomically:YES]) { 324 atomically:YES]) {
325 fprintf(stderr, "ERROR: Failed to write out '%s'\n", 325 fprintf(stderr, "ERROR: Failed to write out '%s'\n",
326 [output_path UTF8String]); 326 [output_path UTF8String]);
327 exit(1); 327 exit(1);
328 } 328 }
329 } 329 }
330 return 0; 330 return 0;
331 } 331 }
OLDNEW
« no previous file with comments | « chrome/tools/convert_dict/convert_dict_unittest.cc ('k') | chrome/utility/extensions/unpacker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698