Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: chrome/browser/extensions/webstore_installer.h

Issue 10704026: Reland DownloadItem::Observer::OnDownloadDestroyed() replaces DownloadItem::REMOVING (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 private: 126 private:
127 friend class base::RefCounted<WebstoreInstaller>; 127 friend class base::RefCounted<WebstoreInstaller>;
128 virtual ~WebstoreInstaller(); 128 virtual ~WebstoreInstaller();
129 129
130 // DownloadManager::DownloadUrl callback. 130 // DownloadManager::DownloadUrl callback.
131 void OnDownloadStarted(content::DownloadId id, net::Error error); 131 void OnDownloadStarted(content::DownloadId id, net::Error error);
132 132
133 // DownloadItem::Observer implementation: 133 // DownloadItem::Observer implementation:
134 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; 134 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE;
135 virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE; 135 virtual void OnDownloadDestructed(content::DownloadItem* download) OVERRIDE;
136 136
137 // Starts downloading the extension to |file_path|. 137 // Starts downloading the extension to |file_path|.
138 void StartDownload(const FilePath& file_path); 138 void StartDownload(const FilePath& file_path);
139 139
140 // Reports an install |error| to the delegate for the given extension if this 140 // Reports an install |error| to the delegate for the given extension if this
141 // managed its installation. This also removes the associated PendingInstall. 141 // managed its installation. This also removes the associated PendingInstall.
142 void ReportFailure(const std::string& error); 142 void ReportFailure(const std::string& error);
143 143
144 // Reports a successful install to the delegate for the given extension if 144 // Reports a successful install to the delegate for the given extension if
145 // this managed its installation. This also removes the associated 145 // this managed its installation. This also removes the associated
146 // PendingInstall. 146 // PendingInstall.
147 void ReportSuccess(); 147 void ReportSuccess();
148 148
149 content::NotificationRegistrar registrar_; 149 content::NotificationRegistrar registrar_;
150 Profile* profile_; 150 Profile* profile_;
151 Delegate* delegate_; 151 Delegate* delegate_;
152 content::NavigationController* controller_; 152 content::NavigationController* controller_;
153 std::string id_; 153 std::string id_;
154 // The DownloadItem is owned by the DownloadManager and is valid from when 154 // The DownloadItem is owned by the DownloadManager and is valid from when
155 // OnDownloadStarted is called (with no error) until the DownloadItem 155 // OnDownloadStarted is called (with no error) until the DownloadItem
156 // transitions to state REMOVING. 156 // transitions to state REMOVING.
157 content::DownloadItem* download_item_; 157 content::DownloadItem* download_item_;
158 int flags_; 158 int flags_;
159 scoped_ptr<Approval> approval_; 159 scoped_ptr<Approval> approval_;
160 GURL download_url_; 160 GURL download_url_;
161 }; 161 };
162 162
163 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ 163 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698