blob: 7f0cdba16b1edb99d8885653ee5ed037f333e509 (
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
30
31
|
// 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/extensions/webstore_startup_installer.h"
namespace extensions {
WebstoreStartupInstaller::WebstoreStartupInstaller(
const std::string& webstore_item_id,
Profile* profile,
bool show_prompt,
const Callback& callback)
: WebstoreInstallWithPrompt(webstore_item_id, profile, callback),
show_prompt_(show_prompt) {
set_install_source(WebstoreInstaller::INSTALL_SOURCE_INLINE);
set_show_post_install_ui(false);
}
WebstoreStartupInstaller::~WebstoreStartupInstaller() {}
scoped_ptr<ExtensionInstallPrompt::Prompt>
WebstoreStartupInstaller::CreateInstallPrompt() const {
if (show_prompt_) {
return make_scoped_ptr(new ExtensionInstallPrompt::Prompt(
ExtensionInstallPrompt::INSTALL_PROMPT));
}
return NULL;
}
} // namespace extensions
|