| 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 "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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 static void CancelAllDownloads(); | 61 static void CancelAllDownloads(); |
| 62 | 62 |
| 63 // Sets the DownloadManagerDelegate associated with this object and | 63 // Sets the DownloadManagerDelegate associated with this object and |
| 64 // its DownloadManager. Takes ownership of |delegate|, and destroys | 64 // its DownloadManager. Takes ownership of |delegate|, and destroys |
| 65 // the previous delegate. For testing. | 65 // the previous delegate. For testing. |
| 66 void SetDownloadManagerDelegateForTesting( | 66 void SetDownloadManagerDelegateForTesting( |
| 67 scoped_ptr<ChromeDownloadManagerDelegate> delegate); | 67 scoped_ptr<ChromeDownloadManagerDelegate> delegate); |
| 68 | 68 |
| 69 // Will be called to release references on other services as part | 69 // Will be called to release references on other services as part |
| 70 // of Profile shutdown. | 70 // of Profile shutdown. |
| 71 virtual void Shutdown() OVERRIDE; | 71 virtual void Shutdown() override; |
| 72 | 72 |
| 73 // Returns false if at least one extension has disabled the shelf, true | 73 // Returns false if at least one extension has disabled the shelf, true |
| 74 // otherwise. | 74 // otherwise. |
| 75 bool IsShelfEnabled(); | 75 bool IsShelfEnabled(); |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 bool download_manager_created_; | 78 bool download_manager_created_; |
| 79 Profile* profile_; | 79 Profile* profile_; |
| 80 | 80 |
| 81 // ChromeDownloadManagerDelegate may be the target of callbacks from | 81 // ChromeDownloadManagerDelegate may be the target of callbacks from |
| (...skipping 21 matching lines...) Expand all Loading... |
| 103 // should be a separate EDER for on-record and off-record managers. | 103 // should be a separate EDER for on-record and off-record managers. |
| 104 // There does not appear to be a separate ExtensionSystem for on-record and | 104 // There does not appear to be a separate ExtensionSystem for on-record and |
| 105 // off-record profiles, so ExtensionSystem cannot own the EDER. | 105 // off-record profiles, so ExtensionSystem cannot own the EDER. |
| 106 scoped_ptr<extensions::ExtensionDownloadsEventRouter> extension_event_router_; | 106 scoped_ptr<extensions::ExtensionDownloadsEventRouter> extension_event_router_; |
| 107 #endif | 107 #endif |
| 108 | 108 |
| 109 DISALLOW_COPY_AND_ASSIGN(DownloadService); | 109 DISALLOW_COPY_AND_ASSIGN(DownloadService); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SERVICE_H_ | 112 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SERVICE_H_ |
| OLD | NEW |