Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/web_applications/web_app.h" | |
| 6 | |
| 7 #include "base/environment.h" | |
| 8 #include "content/public/browser/browser_thread.h" | |
| 9 | |
| 10 namespace web_app { | |
| 11 | |
| 12 namespace internals { | |
| 13 | |
| 14 void CreateShortcutTask(const FilePath& web_app_path, | |
| 15 const FilePath& profile_path, | |
| 16 const ShellIntegration::ShortcutInfo& shortcut_info) { | |
| 17 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); | |
| 18 | |
| 19 scoped_ptr<base::Environment> env(base::Environment::Create()); | |
| 20 | |
| 21 std::string shortcut_template; | |
| 22 if (!ShellIntegration::GetDesktopShortcutTemplate(env.get(), | |
| 23 &shortcut_template)) { | |
| 24 return; | |
| 25 } | |
| 26 ShellIntegration::CreateDesktopShortcut(shortcut_info, shortcut_template); | |
| 27 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.
| |
| 28 } | |
| 29 | |
| 30 } // namespace internals | |
| 31 | |
| 32 } // namespace web_app | |
| OLD | NEW |