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

Side by Side Diff: chrome/browser/web_applications/web_app.cc

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 unit tests 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 #include "chrome/browser/web_applications/web_app.h" 5 #include "chrome/browser/web_applications/web_app.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/i18n/file_util_icu.h" 10 #include "base/i18n/file_util_icu.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "base/threading/thread.h" 13 #include "base/threading/thread.h"
14 #include "chrome/common/chrome_constants.h" 14 #include "chrome/common/chrome_constants.h"
15 #include "chrome/common/chrome_version_info.h" 15 #include "chrome/common/chrome_version_info.h"
16 #include "chrome/common/extensions/extension.h" 16 #include "chrome/common/extensions/extension.h"
17 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" 17 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
18 #include "chrome/common/url_constants.h" 18 #include "chrome/common/url_constants.h"
19 #include "chrome/installer/util/browser_distribution.h"
gab 2013/10/03 17:22:49 Remove unused include.
calamity 2013/10/14 02:24:25 Done.
19 #include "content/public/browser/browser_thread.h" 20 #include "content/public/browser/browser_thread.h"
20 #include "extensions/common/constants.h" 21 #include "extensions/common/constants.h"
21 #include "grit/chromium_strings.h"
22 #include "ui/base/l10n/l10n_util.h"
23 22
24 using content::BrowserThread; 23 using content::BrowserThread;
25 24
26 namespace { 25 namespace {
27 26
28 #if defined(TOOLKIT_VIEWS) 27 #if defined(TOOLKIT_VIEWS)
29 // Predicator for sorting images from largest to smallest. 28 // Predicator for sorting images from largest to smallest.
30 bool IconPrecedes(const WebApplicationInfo::IconInfo& left, 29 bool IconPrecedes(const WebApplicationInfo::IconInfo& left,
31 const WebApplicationInfo::IconInfo& right) { 30 const WebApplicationInfo::IconInfo& right) {
32 return left.width < right.width; 31 return left.width < right.width;
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 #endif 228 #endif
230 229
231 #if defined(OS_LINUX) 230 #if defined(OS_LINUX)
232 std::string GetWMClassFromAppName(std::string app_name) { 231 std::string GetWMClassFromAppName(std::string app_name) {
233 file_util::ReplaceIllegalCharactersInPath(&app_name, '_'); 232 file_util::ReplaceIllegalCharactersInPath(&app_name, '_');
234 TrimString(app_name, "_", &app_name); 233 TrimString(app_name, "_", &app_name);
235 return app_name; 234 return app_name;
236 } 235 }
237 #endif 236 #endif
238 237
239 string16 GetAppShortcutsSubdirName() {
240 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
241 if (channel == chrome::VersionInfo::CHANNEL_CANARY)
242 return l10n_util::GetStringUTF16(IDS_APP_SHORTCUTS_SUBDIR_NAME_CANARY);
243 return l10n_util::GetStringUTF16(IDS_APP_SHORTCUTS_SUBDIR_NAME);
244 }
245
246 } // namespace web_app 238 } // namespace web_app
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698