Index: chrome/browser/extensions/api/downloads/downloads_api.h |
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.h b/chrome/browser/extensions/api/downloads/downloads_api.h |
index 1179f462976ea21109d1e9f52c4f854fd11224a1..c8a148eb4b8c497e2588142aaa59a5b785aea4e6 100644 |
--- a/chrome/browser/extensions/api/downloads/downloads_api.h |
+++ b/chrome/browser/extensions/api/downloads/downloads_api.h |
@@ -42,7 +42,7 @@ extern const char kInvalidOperationError[]; |
extern const char kInvalidOrderByError[]; |
extern const char kInvalidQueryLimit[]; |
extern const char kInvalidStateError[]; |
-extern const char kInvalidUrlError[]; |
+extern const char kInvalidURLError[]; |
extern const char kNotImplementedError[]; |
} // namespace download_extension_errors |
@@ -350,7 +350,8 @@ class DownloadsGetFileIconFunction : public AsyncDownloadsFunction { |
class ExtensionDownloadsEventRouter : public content::DownloadManager::Observer, |
public content::DownloadItem::Observer { |
public: |
- explicit ExtensionDownloadsEventRouter(Profile* profile); |
+ explicit ExtensionDownloadsEventRouter( |
+ Profile* profile, content::DownloadManager* manager); |
virtual ~ExtensionDownloadsEventRouter(); |
virtual void ModelChanged(content::DownloadManager* manager) OVERRIDE; |
@@ -358,6 +359,12 @@ class ExtensionDownloadsEventRouter : public content::DownloadManager::Observer, |
virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; |
virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE; |
+ // Used for testing. |
+ struct DownloadsNotificationSource { |
+ std::string event_name; |
+ Profile* profile; |
+ }; |
+ |
private: |
struct OnChangedStat { |
OnChangedStat(); |
@@ -370,7 +377,6 @@ class ExtensionDownloadsEventRouter : public content::DownloadManager::Observer, |
typedef std::map<int, base::DictionaryValue*> ItemJsonMap; |
typedef std::map<int, OnChangedStat*> OnChangedStatMap; |
- void Init(content::DownloadManager* manager); |
void DispatchEvent(const char* event_name, base::Value* json_arg); |
Profile* profile_; |