| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 friend struct content::BrowserThread::DeleteOnThread< | 131 friend struct content::BrowserThread::DeleteOnThread< |
| 132 content::BrowserThread::UI>; | 132 content::BrowserThread::UI>; |
| 133 friend class base::DeleteHelper<WebstoreInstaller>; | 133 friend class base::DeleteHelper<WebstoreInstaller>; |
| 134 virtual ~WebstoreInstaller(); | 134 virtual ~WebstoreInstaller(); |
| 135 | 135 |
| 136 // DownloadManager::DownloadUrl callback. | 136 // DownloadManager::DownloadUrl callback. |
| 137 void OnDownloadStarted(content::DownloadId id, net::Error error); | 137 void OnDownloadStarted(content::DownloadId id, net::Error error); |
| 138 | 138 |
| 139 // DownloadItem::Observer implementation: | 139 // DownloadItem::Observer implementation: |
| 140 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; | 140 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; |
| 141 virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE; | 141 virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE; |
| 142 | 142 |
| 143 // Starts downloading the extension to |file_path|. | 143 // Starts downloading the extension to |file_path|. |
| 144 void StartDownload(const FilePath& file_path); | 144 void StartDownload(const FilePath& file_path); |
| 145 | 145 |
| 146 // Reports an install |error| to the delegate for the given extension if this | 146 // Reports an install |error| to the delegate for the given extension if this |
| 147 // managed its installation. This also removes the associated PendingInstall. | 147 // managed its installation. This also removes the associated PendingInstall. |
| 148 void ReportFailure(const std::string& error); | 148 void ReportFailure(const std::string& error); |
| 149 | 149 |
| 150 // Reports a successful install to the delegate for the given extension if | 150 // Reports a successful install to the delegate for the given extension if |
| 151 // this managed its installation. This also removes the associated | 151 // this managed its installation. This also removes the associated |
| (...skipping 10 matching lines...) Expand all Loading... |
| 162 // transitions to state REMOVING. | 162 // transitions to state REMOVING. |
| 163 content::DownloadItem* download_item_; | 163 content::DownloadItem* download_item_; |
| 164 int flags_; | 164 int flags_; |
| 165 scoped_ptr<Approval> approval_; | 165 scoped_ptr<Approval> approval_; |
| 166 GURL download_url_; | 166 GURL download_url_; |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 } // namespace extensions | 169 } // namespace extensions |
| 170 | 170 |
| 171 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ | 171 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ |
| OLD | NEW |