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

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

Issue 10535026: Move creation and ownership of DownloadManager from the embedder to content. This matches all the o… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros compile Created 8 years, 6 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_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_
6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ 6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 30 matching lines...) Expand all
41 // This is the Chrome side helper for the download system. 41 // This is the Chrome side helper for the download system.
42 class ChromeDownloadManagerDelegate 42 class ChromeDownloadManagerDelegate
43 : public base::RefCountedThreadSafe<ChromeDownloadManagerDelegate>, 43 : public base::RefCountedThreadSafe<ChromeDownloadManagerDelegate>,
44 public content::DownloadManagerDelegate, 44 public content::DownloadManagerDelegate,
45 public content::NotificationObserver { 45 public content::NotificationObserver {
46 public: 46 public:
47 explicit ChromeDownloadManagerDelegate(Profile* profile); 47 explicit ChromeDownloadManagerDelegate(Profile* profile);
48 48
49 void SetDownloadManager(content::DownloadManager* dm); 49 void SetDownloadManager(content::DownloadManager* dm);
50 50
51 void ProfileShutdown();
52
51 // Should be called before the first call to ShouldCompleteDownload() to 53 // Should be called before the first call to ShouldCompleteDownload() to
52 // disable SafeBrowsing checks for |item|. 54 // disable SafeBrowsing checks for |item|.
53 static void DisableSafeBrowsing(content::DownloadItem* item); 55 static void DisableSafeBrowsing(content::DownloadItem* item);
54 56
55 virtual void Shutdown() OVERRIDE; 57 virtual void Shutdown() OVERRIDE;
56 virtual content::DownloadId GetNextId() OVERRIDE; 58 virtual content::DownloadId GetNextId() OVERRIDE;
57 virtual bool ShouldStartDownload(int32 download_id) OVERRIDE; 59 virtual bool ShouldStartDownload(int32 download_id) OVERRIDE;
58 virtual void ChooseDownloadPath(content::WebContents* web_contents, 60 virtual void ChooseDownloadPath(content::WebContents* web_contents,
59 const FilePath& suggested_path, 61 const FilePath& suggested_path,
60 int32 download_id) OVERRIDE; 62 int32 download_id) OVERRIDE;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // Maps from pending extension installations to DownloadItem IDs. 190 // Maps from pending extension installations to DownloadItem IDs.
189 typedef base::hash_map<CrxInstaller*, int> CrxInstallerMap; 191 typedef base::hash_map<CrxInstaller*, int> CrxInstallerMap;
190 CrxInstallerMap crx_installers_; 192 CrxInstallerMap crx_installers_;
191 193
192 content::NotificationRegistrar registrar_; 194 content::NotificationRegistrar registrar_;
193 195
194 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); 196 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate);
195 }; 197 };
196 198
197 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ 199 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698