Chromium Code Reviews| Index: chrome/browser/web_applications/web_app_linux.cc |
| diff --git a/chrome/browser/web_applications/web_app_linux.cc b/chrome/browser/web_applications/web_app_linux.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6ae75ebcb366fd7fe0a8c0fa708bbe709fc06aa3 |
| --- /dev/null |
| +++ b/chrome/browser/web_applications/web_app_linux.cc |
| @@ -0,0 +1,32 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/web_applications/web_app.h" |
| + |
| +#include "base/environment.h" |
| +#include "content/public/browser/browser_thread.h" |
| + |
| +namespace web_app { |
| + |
| +namespace internals { |
| + |
| +void CreateShortcutTask(const FilePath& web_app_path, |
| + const FilePath& profile_path, |
| + const ShellIntegration::ShortcutInfo& shortcut_info) { |
| + DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); |
| + |
| + scoped_ptr<base::Environment> env(base::Environment::Create()); |
| + |
| + std::string shortcut_template; |
| + if (!ShellIntegration::GetDesktopShortcutTemplate(env.get(), |
| + &shortcut_template)) { |
| + return; |
| + } |
| + ShellIntegration::CreateDesktopShortcut(shortcut_info, shortcut_template); |
| + return; // assuming always success. |
|
Mark Mentovai
2012/02/08 05:53:26
No need to return as the last statement of a void-
sail
2012/02/08 06:12:51
Done.
|
| +} |
| + |
| +} // namespace internals |
| + |
| +} // namespace web_app |