| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 private: | 127 private: |
| 128 friend class base::RefCounted<WebstoreInstaller>; | 128 friend class base::RefCounted<WebstoreInstaller>; |
| 129 virtual ~WebstoreInstaller(); | 129 virtual ~WebstoreInstaller(); |
| 130 | 130 |
| 131 // DownloadManager::DownloadUrl callback. | 131 // DownloadManager::DownloadUrl callback. |
| 132 void OnDownloadStarted(content::DownloadId id, net::Error error); | 132 void OnDownloadStarted(content::DownloadId id, net::Error error); |
| 133 | 133 |
| 134 // DownloadItem::Observer implementation: | 134 // DownloadItem::Observer implementation: |
| 135 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; | 135 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; |
| 136 virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE; | 136 virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE; |
| 137 | 137 |
| 138 // Starts downloading the extension to |file_path|. | 138 // Starts downloading the extension to |file_path|. |
| 139 void StartDownload(const FilePath& file_path); | 139 void StartDownload(const FilePath& file_path); |
| 140 | 140 |
| 141 // Reports an install |error| to the delegate for the given extension if this | 141 // Reports an install |error| to the delegate for the given extension if this |
| 142 // managed its installation. This also removes the associated PendingInstall. | 142 // managed its installation. This also removes the associated PendingInstall. |
| 143 void ReportFailure(const std::string& error); | 143 void ReportFailure(const std::string& error); |
| 144 | 144 |
| 145 // Reports a successful install to the delegate for the given extension if | 145 // Reports a successful install to the delegate for the given extension if |
| 146 // this managed its installation. This also removes the associated | 146 // this managed its installation. This also removes the associated |
| (...skipping 10 matching lines...) Expand all 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 |