OLD | NEW |
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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" | 14 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" |
15 | 15 |
16 class ChromeDownloadManagerDelegate; | 16 class ChromeDownloadManagerDelegate; |
17 class DownloadHistory; | 17 class DownloadHistory; |
18 class DownloadUIController; | 18 class DownloadUIController; |
19 class ExtensionDownloadsEventRouter; | 19 class ExtensionDownloadsEventRouter; |
20 class Profile; | 20 class Profile; |
21 | 21 |
22 namespace content { | 22 namespace content { |
23 class DownloadManager; | 23 class DownloadManager; |
24 } | 24 } |
25 | 25 |
26 // Owning class for ChromeDownloadManagerDelegate. | 26 // Owning class for ChromeDownloadManagerDelegate. |
27 class DownloadService : public ProfileKeyedService { | 27 class DownloadService : public BrowserContextKeyedService { |
28 public: | 28 public: |
29 explicit DownloadService(Profile* profile); | 29 explicit DownloadService(Profile* profile); |
30 virtual ~DownloadService(); | 30 virtual ~DownloadService(); |
31 | 31 |
32 // Get the download manager delegate, creating it if it doesn't already exist. | 32 // Get the download manager delegate, creating it if it doesn't already exist. |
33 ChromeDownloadManagerDelegate* GetDownloadManagerDelegate(); | 33 ChromeDownloadManagerDelegate* GetDownloadManagerDelegate(); |
34 | 34 |
35 // Get the interface to the history system. Returns NULL if profile is | 35 // Get the interface to the history system. Returns NULL if profile is |
36 // incognito or if the DownloadManager hasn't been created yet or if there is | 36 // incognito or if the DownloadManager hasn't been created yet or if there is |
37 // no HistoryService for profile. | 37 // no HistoryService for profile. |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // should be a separate EDER for on-record and off-record managers. | 89 // should be a separate EDER for on-record and off-record managers. |
90 // There does not appear to be a separate ExtensionSystem for on-record and | 90 // There does not appear to be a separate ExtensionSystem for on-record and |
91 // off-record profiles, so ExtensionSystem cannot own the EDER. | 91 // off-record profiles, so ExtensionSystem cannot own the EDER. |
92 scoped_ptr<ExtensionDownloadsEventRouter> extension_event_router_; | 92 scoped_ptr<ExtensionDownloadsEventRouter> extension_event_router_; |
93 #endif | 93 #endif |
94 | 94 |
95 DISALLOW_COPY_AND_ASSIGN(DownloadService); | 95 DISALLOW_COPY_AND_ASSIGN(DownloadService); |
96 }; | 96 }; |
97 | 97 |
98 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SERVICE_H_ | 98 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SERVICE_H_ |
OLD | NEW |