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

Side by Side Diff: chrome/browser/web_applications/web_app_mac.mm

Issue 13864015: Move app launcher and chrome apps shortcut strings into the installer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@migrate_app_id_fix
Patch Set: fix linux Created 7 years, 2 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
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 #import "chrome/browser/web_applications/web_app_mac.h" 5 #import "chrome/browser/web_applications/web_app_mac.h"
6 6
7 #import <Carbon/Carbon.h> 7 #import <Carbon/Carbon.h>
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "apps/app_shim/app_shim_mac.h" 10 #include "apps/app_shim/app_shim_mac.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 // | + .localized 248 // | + .localized
249 // | | en.strings 249 // | | en.strings
250 // | | de.strings 250 // | | de.strings
251 void UpdateAppShortcutsSubdirLocalizedName( 251 void UpdateAppShortcutsSubdirLocalizedName(
252 const base::FilePath& apps_directory) { 252 const base::FilePath& apps_directory) {
253 base::FilePath localized = apps_directory.Append(".localized"); 253 base::FilePath localized = apps_directory.Append(".localized");
254 if (!file_util::CreateDirectory(localized)) 254 if (!file_util::CreateDirectory(localized))
255 return; 255 return;
256 256
257 base::FilePath directory_name = apps_directory.BaseName().RemoveExtension(); 257 base::FilePath directory_name = apps_directory.BaseName().RemoveExtension();
258 string16 localized_name = web_app::GetAppShortcutsSubdirName(); 258 base::string16 localized_name = ShellIntegration::GetAppShortcutsSubdirName();
259 NSDictionary* strings_dict = @{ 259 NSDictionary* strings_dict = @{
260 base::mac::FilePathToNSString(directory_name) : 260 base::mac::FilePathToNSString(directory_name) :
261 base::SysUTF16ToNSString(localized_name) 261 base::SysUTF16ToNSString(localized_name)
262 }; 262 };
263 263
264 std::string locale = l10n_util::NormalizeLocale( 264 std::string locale = l10n_util::NormalizeLocale(
265 l10n_util::GetApplicationLocale(std::string())); 265 l10n_util::GetApplicationLocale(std::string()));
266 266
267 NSString* strings_path = base::mac::FilePathToNSString( 267 NSString* strings_path = base::mac::FilePathToNSString(
268 localized.Append(locale + ".strings")); 268 localized.Append(locale + ".strings"));
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 ShellIntegration::ShortcutInfo shortcut_info = 740 ShellIntegration::ShortcutInfo shortcut_info =
741 BuildShortcutInfoFromBundle(*it); 741 BuildShortcutInfoFromBundle(*it);
742 WebAppShortcutCreator shortcut_creator(it->DirName(), shortcut_info); 742 WebAppShortcutCreator shortcut_creator(it->DirName(), shortcut_info);
743 shortcut_creator.DeleteShortcuts(); 743 shortcut_creator.DeleteShortcuts();
744 } 744 }
745 } 745 }
746 746
747 } // namespace internals 747 } // namespace internals
748 748
749 } // namespace web_app 749 } // namespace web_app
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698