| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 // Whether to skip the post install UI like the extension installed bubble. | 76 // Whether to skip the post install UI like the extension installed bubble. |
| 77 bool skip_post_install_ui; | 77 bool skip_post_install_ui; |
| 78 | 78 |
| 79 // Whether to skip the install dialog once the extension has been downloaded | 79 // Whether to skip the install dialog once the extension has been downloaded |
| 80 // and unpacked. One reason this can be true is that in the normal webstore | 80 // and unpacked. One reason this can be true is that in the normal webstore |
| 81 // installation, the dialog is shown earlier, before any download is done, | 81 // installation, the dialog is shown earlier, before any download is done, |
| 82 // so there's no need to show it again. | 82 // so there's no need to show it again. |
| 83 bool skip_install_dialog; | 83 bool skip_install_dialog; |
| 84 | 84 |
| 85 // Whether we should record an oauth2 grant for the extensions. |
| 86 bool record_oauth2_grant; |
| 87 |
| 85 private: | 88 private: |
| 86 Approval(); | 89 Approval(); |
| 87 }; | 90 }; |
| 88 | 91 |
| 89 // Gets the Approval associated with the |download|, or NULL if there's none. | 92 // Gets the Approval associated with the |download|, or NULL if there's none. |
| 90 // Note that the Approval is owned by |download|. | 93 // Note that the Approval is owned by |download|. |
| 91 static const Approval* GetAssociatedApproval( | 94 static const Approval* GetAssociatedApproval( |
| 92 const content::DownloadItem& download); | 95 const content::DownloadItem& download); |
| 93 | 96 |
| 94 // Creates a WebstoreInstaller for downloading and installing the extension | 97 // Creates a WebstoreInstaller for downloading and installing the extension |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // The DownloadItem is owned by the DownloadManager and is valid from when | 151 // The DownloadItem is owned by the DownloadManager and is valid from when |
| 149 // OnDownloadStarted is called (with no error) until the DownloadItem | 152 // OnDownloadStarted is called (with no error) until the DownloadItem |
| 150 // transitions to state REMOVING. | 153 // transitions to state REMOVING. |
| 151 content::DownloadItem* download_item_; | 154 content::DownloadItem* download_item_; |
| 152 int flags_; | 155 int flags_; |
| 153 scoped_ptr<Approval> approval_; | 156 scoped_ptr<Approval> approval_; |
| 154 GURL download_url_; | 157 GURL download_url_; |
| 155 }; | 158 }; |
| 156 | 159 |
| 157 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ | 160 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ |
| OLD | NEW |