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

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 nits Created 7 years, 1 month 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // | + .localized 255 // | + .localized
256 // | | en.strings 256 // | | en.strings
257 // | | de.strings 257 // | | de.strings
258 void UpdateAppShortcutsSubdirLocalizedName( 258 void UpdateAppShortcutsSubdirLocalizedName(
259 const base::FilePath& apps_directory) { 259 const base::FilePath& apps_directory) {
260 base::FilePath localized = apps_directory.Append(".localized"); 260 base::FilePath localized = apps_directory.Append(".localized");
261 if (!file_util::CreateDirectory(localized)) 261 if (!file_util::CreateDirectory(localized))
262 return; 262 return;
263 263
264 base::FilePath directory_name = apps_directory.BaseName().RemoveExtension(); 264 base::FilePath directory_name = apps_directory.BaseName().RemoveExtension();
265 string16 localized_name = web_app::GetAppShortcutsSubdirName(); 265 base::string16 localized_name = ShellIntegration::GetAppShortcutsSubdirName();
266 NSDictionary* strings_dict = @{ 266 NSDictionary* strings_dict = @{
267 base::mac::FilePathToNSString(directory_name) : 267 base::mac::FilePathToNSString(directory_name) :
268 base::SysUTF16ToNSString(localized_name) 268 base::SysUTF16ToNSString(localized_name)
269 }; 269 };
270 270
271 std::string locale = l10n_util::NormalizeLocale( 271 std::string locale = l10n_util::NormalizeLocale(
272 l10n_util::GetApplicationLocale(std::string())); 272 l10n_util::GetApplicationLocale(std::string()));
273 273
274 NSString* strings_path = base::mac::FilePathToNSString( 274 NSString* strings_path = base::mac::FilePathToNSString(
275 localized.Append(locale + ".strings")); 275 localized.Append(locale + ".strings"));
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 ShellIntegration::ShortcutInfo shortcut_info = 783 ShellIntegration::ShortcutInfo shortcut_info =
784 BuildShortcutInfoFromBundle(*it); 784 BuildShortcutInfoFromBundle(*it);
785 WebAppShortcutCreator shortcut_creator(it->DirName(), shortcut_info); 785 WebAppShortcutCreator shortcut_creator(it->DirName(), shortcut_info);
786 shortcut_creator.DeleteShortcuts(); 786 shortcut_creator.DeleteShortcuts();
787 } 787 }
788 } 788 }
789 789
790 } // namespace internals 790 } // namespace internals
791 791
792 } // namespace web_app 792 } // namespace web_app
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698