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.
5 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_STARTUP_INSTALLER_H_
6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_STARTUP_INSTALLER_H_
8 #include "chrome/browser/extensions/webstore_install_with_prompt.h"
10 namespace extensions
{
12 // Manages inline installs requested to be performed at startup, e.g. via a
13 // command line option: downloads and parses metadata from the webstore,
14 // optionally shows an install UI, starts the download once the user
17 // Clients will be notified of success or failure via the |callback| argument
18 // passed into the constructor.
19 class WebstoreStartupInstaller
: public WebstoreInstallWithPrompt
{
21 WebstoreStartupInstaller(const std::string
& webstore_item_id
,
24 const Callback
& callback
);
27 friend class base::RefCountedThreadSafe
<WebstoreStartupInstaller
>;
28 FRIEND_TEST_ALL_PREFIXES(WebstoreStartupInstallerTest
, DomainVerification
);
30 ~WebstoreStartupInstaller() override
;
32 // Implementations of WebstoreStandaloneInstaller Template Method's hooks.
33 scoped_refptr
<ExtensionInstallPrompt::Prompt
> CreateInstallPrompt()
39 DISALLOW_IMPLICIT_CONSTRUCTORS(WebstoreStartupInstaller
);
42 } // namespace extensions
44 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_STARTUP_INSTALLER_H_