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

Side by Side Diff: chrome/browser/download/download_extension_api.h

Issue 8804018: Delay DownloadManager creation by adding a callback queue to DownloadService (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: comments Created 9 years 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
« no previous file with comments | « no previous file | chrome/browser/download/download_extension_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_DOWNLOAD_DOWNLOAD_EXTENSION_API_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_EXTENSION_API_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_EXTENSION_API_H_ 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_EXTENSION_API_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 class ExtensionDownloadsEventRouter : public DownloadManager::Observer { 256 class ExtensionDownloadsEventRouter : public DownloadManager::Observer {
257 public: 257 public:
258 explicit ExtensionDownloadsEventRouter(Profile* profile); 258 explicit ExtensionDownloadsEventRouter(Profile* profile);
259 virtual ~ExtensionDownloadsEventRouter(); 259 virtual ~ExtensionDownloadsEventRouter();
260 260
261 virtual void ModelChanged() OVERRIDE; 261 virtual void ModelChanged() OVERRIDE;
262 virtual void ManagerGoingDown() OVERRIDE; 262 virtual void ManagerGoingDown() OVERRIDE;
263 263
264 private: 264 private:
265 void Init(DownloadManager* manager);
265 void DispatchEvent(const char* event_name, base::Value* json_arg); 266 void DispatchEvent(const char* event_name, base::Value* json_arg);
266 typedef base::hash_map<int, DownloadItem*> ItemMap; 267 typedef base::hash_map<int, DownloadItem*> ItemMap;
267 typedef std::set<int> DownloadIdSet; 268 typedef std::set<int> DownloadIdSet;
268 269
269 Profile* profile_; 270 Profile* profile_;
270 DownloadManager* manager_; 271 DownloadManager* manager_;
271 DownloadIdSet downloads_; 272 DownloadIdSet downloads_;
272 273
273 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter); 274 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter);
274 }; 275 };
275 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_EXTENSION_API_H_ 276 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_EXTENSION_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/download_extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698