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

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

Issue 1016543004: [Mac] Use the app's version as the app shim bundle version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use GetVersionForDisplay. Created 5 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
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/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 ShortcutInfo shortcut_info; 211 ShortcutInfo shortcut_info;
212 shortcut_info.extension_id = app->id(); 212 shortcut_info.extension_id = app->id();
213 shortcut_info.is_platform_app = app->is_platform_app(); 213 shortcut_info.is_platform_app = app->is_platform_app();
214 shortcut_info.url = extensions::AppLaunchInfo::GetLaunchWebURL(app); 214 shortcut_info.url = extensions::AppLaunchInfo::GetLaunchWebURL(app);
215 shortcut_info.title = base::UTF8ToUTF16(app->name()); 215 shortcut_info.title = base::UTF8ToUTF16(app->name());
216 shortcut_info.description = base::UTF8ToUTF16(app->description()); 216 shortcut_info.description = base::UTF8ToUTF16(app->description());
217 shortcut_info.extension_path = app->path(); 217 shortcut_info.extension_path = app->path();
218 shortcut_info.profile_path = profile->GetPath(); 218 shortcut_info.profile_path = profile->GetPath();
219 shortcut_info.profile_name = 219 shortcut_info.profile_name =
220 profile->GetPrefs()->GetString(prefs::kProfileName); 220 profile->GetPrefs()->GetString(prefs::kProfileName);
221 shortcut_info.version_for_display = app->GetVersionForDisplay();
221 return shortcut_info; 222 return shortcut_info;
222 } 223 }
223 224
224 void GetInfoForApp(const extensions::Extension* extension, 225 void GetInfoForApp(const extensions::Extension* extension,
225 Profile* profile, 226 Profile* profile,
226 const InfoCallback& callback) { 227 const InfoCallback& callback) {
227 web_app::ShortcutInfo shortcut_info = 228 web_app::ShortcutInfo shortcut_info =
228 web_app::ShortcutInfoForExtensionAndProfile(extension, profile); 229 web_app::ShortcutInfoForExtensionAndProfile(extension, profile);
229 const std::vector<extensions::FileHandlerInfo>* file_handlers = 230 const std::vector<extensions::FileHandlerInfo>* file_handlers =
230 extensions::FileHandlers::GetFileHandlers(extension); 231 extensions::FileHandlers::GetFileHandlers(extension);
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 483
483 #if defined(OS_LINUX) 484 #if defined(OS_LINUX)
484 std::string GetWMClassFromAppName(std::string app_name) { 485 std::string GetWMClassFromAppName(std::string app_name) {
485 base::i18n::ReplaceIllegalCharactersInPath(&app_name, '_'); 486 base::i18n::ReplaceIllegalCharactersInPath(&app_name, '_');
486 base::TrimString(app_name, "_", &app_name); 487 base::TrimString(app_name, "_", &app_name);
487 return app_name; 488 return app_name;
488 } 489 }
489 #endif 490 #endif
490 491
491 } // namespace web_app 492 } // namespace web_app
OLDNEW
« no previous file with comments | « chrome/browser/web_applications/web_app.h ('k') | chrome/browser/web_applications/web_app_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698