OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 const std::string& error) = 0; | 48 const std::string& error) = 0; |
49 | 49 |
50 protected: | 50 protected: |
51 virtual ~Delegate() {} | 51 virtual ~Delegate() {} |
52 }; | 52 }; |
53 | 53 |
54 // Contains information about what parts of the extension install process can | 54 // Contains information about what parts of the extension install process can |
55 // be skipped or modified. If one of these is present, it means that a CRX | 55 // be skipped or modified. If one of these is present, it means that a CRX |
56 // download was initiated by WebstoreInstaller. The Approval instance should | 56 // download was initiated by WebstoreInstaller. The Approval instance should |
57 // be checked further for additional details. | 57 // be checked further for additional details. |
58 struct Approval : public content::DownloadItem::ExternalData { | 58 struct Approval : public base::SupportsUserData::Data { |
59 static scoped_ptr<Approval> CreateWithInstallPrompt(Profile* profile); | 59 static scoped_ptr<Approval> CreateWithInstallPrompt(Profile* profile); |
60 static scoped_ptr<Approval> CreateWithNoInstallPrompt( | 60 static scoped_ptr<Approval> CreateWithNoInstallPrompt( |
61 Profile* profile, | 61 Profile* profile, |
62 const std::string& extension_id, | 62 const std::string& extension_id, |
63 scoped_ptr<base::DictionaryValue> parsed_manifest); | 63 scoped_ptr<base::DictionaryValue> parsed_manifest); |
64 | 64 |
65 virtual ~Approval(); | 65 virtual ~Approval(); |
66 | 66 |
67 // The extension id that was approved for installation. | 67 // The extension id that was approved for installation. |
68 std::string extension_id; | 68 std::string extension_id; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 // transitions to state REMOVING. | 157 // transitions to state REMOVING. |
158 content::DownloadItem* download_item_; | 158 content::DownloadItem* download_item_; |
159 int flags_; | 159 int flags_; |
160 scoped_ptr<Approval> approval_; | 160 scoped_ptr<Approval> approval_; |
161 GURL download_url_; | 161 GURL download_url_; |
162 }; | 162 }; |
163 | 163 |
164 } // namespace extensions | 164 } // namespace extensions |
165 | 165 |
166 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ | 166 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ |
OLD | NEW |