1 // Copyright 2019 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_UTILS_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_UTILS_H_
7 
8 #include "base/macros.h"
9 
10 class Profile;
11 class ProfileKey;
12 
13 namespace download {
14 class InProgressDownloadManager;
15 }
16 
17 class DownloadManagerUtils {
18  public:
19   // Creates an InProgressDownloadManager from a profile.
20   static download::InProgressDownloadManager* RetrieveInProgressDownloadManager(
21       Profile* profile);
22 
23   // Initializes the SimpleDownloadManager that is associated with |key| whenver
24   // possible.
25   static void InitializeSimpleDownloadManager(ProfileKey* key);
26 
27   // Creates an InProgressDownloadManager for a particular |key| if it doesn't
28   // exist and return the pointer.
29   static download::InProgressDownloadManager* GetInProgressDownloadManager(
30       ProfileKey* key);
31 
32  private:
33   DISALLOW_COPY_AND_ASSIGN(DownloadManagerUtils);
34 };
35 
36 #endif  // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_UTILS_H_
37