blob: 72a19e8b9c9c4a0ceae1887c4b9fcb6c305b60e0 [file] [log] [blame]
lazyboye8634172016-01-28 00:10:481// Copyright 2016 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#ifndef EXTENSIONS_BROWSER_EXTERNAL_INSTALL_INFO_H_
6#define EXTENSIONS_BROWSER_EXTERNAL_INSTALL_INFO_H_
7
8#include "base/files/file_path.h"
9#include "base/memory/scoped_vector.h"
10#include "extensions/common/manifest.h"
11
12class GURL;
13
14namespace base {
15class Version;
16}
17
18namespace extensions {
19
20// Holds information about an external extension install from an external
21// provider.
22struct ExternalInstallInfo {
23 ExternalInstallInfo(const std::string& extension_id,
24 int creation_flags,
25 bool mark_acknowledged);
26 virtual ~ExternalInstallInfo() {}
27
28 std::string extension_id;
29 int creation_flags;
30 bool mark_acknowledged;
31
32 private:
33 DISALLOW_COPY_AND_ASSIGN(ExternalInstallInfo);
34};
35
36struct ExternalInstallInfoFile : public ExternalInstallInfo {
37 ExternalInstallInfoFile(const std::string& extension_id,
38 scoped_ptr<base::Version> version,
39 const base::FilePath& path,
40 Manifest::Location crx_location,
41 int creation_flags,
42 bool mark_acknowledged,
43 bool install_immediately);
44 ~ExternalInstallInfoFile() override;
45
46 scoped_ptr<base::Version> version;
47 base::FilePath path;
48 Manifest::Location crx_location;
49 bool install_immediately;
50};
51
52struct ExternalInstallInfoUpdateUrl : public ExternalInstallInfo {
53 ExternalInstallInfoUpdateUrl(const std::string& extension_id,
54 const std::string& install_parameter,
55 scoped_ptr<GURL> update_url,
56 Manifest::Location download_location,
57 int creation_flags,
58 bool mark_acknowledged);
59 ~ExternalInstallInfoUpdateUrl() override;
60
61 std::string install_parameter;
62 scoped_ptr<GURL> update_url;
63 Manifest::Location download_location;
64};
65
66} // namespace extensions
67#endif // EXTENSIONS_BROWSER_EXTERNAL_INSTALL_INFO_H_