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

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

Issue 214523003: Before deleting a profile, cancel all in-progress downloads (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/download/download_service.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) 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_DOWNLOAD_SERVICE_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SERVICE_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SERVICE_H_ 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SERVICE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback_forward.h" 9 #include "base/callback_forward.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 #endif 41 #endif
42 42
43 // Has a download manager been created? 43 // Has a download manager been created?
44 bool HasCreatedDownloadManager(); 44 bool HasCreatedDownloadManager();
45 45
46 // Number of non-malicious downloads associated with this instance of the 46 // Number of non-malicious downloads associated with this instance of the
47 // service. 47 // service.
48 int NonMaliciousDownloadCount() const; 48 int NonMaliciousDownloadCount() const;
49 49
50 // Cancels all in-progress downloads for this profile.
51 void CancelDownloads();
52
50 // Number of non-malicious downloads associated with all profiles. 53 // Number of non-malicious downloads associated with all profiles.
51 static int NonMaliciousDownloadCountAllProfiles(); 54 static int NonMaliciousDownloadCountAllProfiles();
52 55
53 // Cancels all in-progress downloads. 56 // Cancels all in-progress downloads for all profiles.
54 static void CancelAllDownloads(); 57 static void CancelAllDownloads();
55 58
56 // Sets the DownloadManagerDelegate associated with this object and 59 // Sets the DownloadManagerDelegate associated with this object and
57 // its DownloadManager. Takes ownership of |delegate|, and destroys 60 // its DownloadManager. Takes ownership of |delegate|, and destroys
58 // the previous delegate. For testing. 61 // the previous delegate. For testing.
59 void SetDownloadManagerDelegateForTesting( 62 void SetDownloadManagerDelegateForTesting(
60 scoped_ptr<ChromeDownloadManagerDelegate> delegate); 63 scoped_ptr<ChromeDownloadManagerDelegate> delegate);
61 64
62 // Will be called to release references on other services as part 65 // Will be called to release references on other services as part
63 // of Profile shutdown. 66 // of Profile shutdown.
(...skipping 30 matching lines...) Expand all
94 // should be a separate EDER for on-record and off-record managers. 97 // should be a separate EDER for on-record and off-record managers.
95 // There does not appear to be a separate ExtensionSystem for on-record and 98 // There does not appear to be a separate ExtensionSystem for on-record and
96 // off-record profiles, so ExtensionSystem cannot own the EDER. 99 // off-record profiles, so ExtensionSystem cannot own the EDER.
97 scoped_ptr<ExtensionDownloadsEventRouter> extension_event_router_; 100 scoped_ptr<ExtensionDownloadsEventRouter> extension_event_router_;
98 #endif 101 #endif
99 102
100 DISALLOW_COPY_AND_ASSIGN(DownloadService); 103 DISALLOW_COPY_AND_ASSIGN(DownloadService);
101 }; 104 };
102 105
103 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SERVICE_H_ 106 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/download_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698