summaryrefslogtreecommitdiffstats
path: root/chrome/browser/web_applications/web_app_linux.cc
blob: 62a76788443e3bae18dc08d3d3a6911065259cdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// 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);
}

}  // namespace internals
}  // namespace web_app