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

Unified Diff: chrome/browser/web_applications/web_app_win.cc

Issue 9958006: Create Linux platform app shortcuts to run in their own process. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moved new function into shell_integration_linux.h Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/web_applications/web_app_mac.mm ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_applications/web_app_win.cc
diff --git a/chrome/browser/web_applications/web_app_win.cc b/chrome/browser/web_applications/web_app_win.cc
index 5a99442f27ddbbce588a886ca18783d9bb02a908..6169c0cf146d97b75d18a0a61986b945d301819d 100644
--- a/chrome/browser/web_applications/web_app_win.cc
+++ b/chrome/browser/web_applications/web_app_win.cc
@@ -92,9 +92,10 @@ bool CheckAndSaveIcon(const FilePath& icon_file, const SkBitmap& image) {
return true;
}
-void CreateShortcutTask(const FilePath& web_app_path,
- const FilePath& profile_path,
- const ShellIntegration::ShortcutInfo& shortcut_info) {
+bool CreatePlatformShortcut(
+ const FilePath& web_app_path,
+ const FilePath& profile_path,
+ const ShellIntegration::ShortcutInfo& shortcut_info) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
// Shortcut paths under which to create shortcuts.
@@ -135,7 +136,7 @@ void CreateShortcutTask(const FilePath& web_app_path,
continue;
if (!PathService::Get(locations[i].location_id, &path)) {
- return;
+ return false;
}
if (locations[i].sub_dir != NULL)
@@ -158,13 +159,7 @@ void CreateShortcutTask(const FilePath& web_app_path,
}
if (shortcut_paths.empty()) {
- return;
- }
-
- // Ensure web_app_path exists.
- if (!file_util::PathExists(web_app_path) &&
- !file_util::CreateDirectory(web_app_path)) {
- return;
+ return false;
}
// Generates file name to use with persisted ico and shortcut file.
@@ -176,12 +171,12 @@ void CreateShortcutTask(const FilePath& web_app_path,
FILE_PATH_LITERAL(".ico"));
if (!web_app::internals::CheckAndSaveIcon(icon_file,
*shortcut_info.favicon.ToSkBitmap())) {
- return;
+ return false;
}
FilePath chrome_exe;
if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
- return;
+ return false;
}
// Working directory.
@@ -253,6 +248,8 @@ void CreateShortcutTask(const FilePath& web_app_path,
success = false;
}
}
+
+ return success;
}
} // namespace internals
« no previous file with comments | « chrome/browser/web_applications/web_app_mac.mm ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698