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

Side by Side Diff: content/browser/download/download_manager.h

Issue 7618048: Move the core download files to content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // The DownloadManager object manages the process of downloading, including 5 // The DownloadManager object manages the process of downloading, including
6 // updates to the history system and providing the information for displaying 6 // updates to the history system and providing the information for displaying
7 // the downloads view in the Destinations tab. There is one DownloadManager per 7 // the downloads view in the Destinations tab. There is one DownloadManager per
8 // active profile in Chrome. 8 // active profile in Chrome.
9 // 9 //
10 // Download observers: 10 // Download observers:
11 // Objects that are interested in notifications about new downloads, or progress 11 // Objects that are interested in notifications about new downloads, or progress
12 // updates for a given download must implement one of the download observer 12 // updates for a given download must implement one of the download observer
13 // interfaces: 13 // interfaces:
14 // DownloadManager::Observer: 14 // DownloadManager::Observer:
15 // - allows observers, primarily views, to be notified when changes to the 15 // - allows observers, primarily views, to be notified when changes to the
16 // set of all downloads (such as new downloads, or deletes) occur 16 // set of all downloads (such as new downloads, or deletes) occur
17 // Use AddObserver() / RemoveObserver() on the appropriate download object to 17 // Use AddObserver() / RemoveObserver() on the appropriate download object to
18 // receive state updates. 18 // receive state updates.
19 // 19 //
20 // Download state persistence: 20 // Download state persistence:
21 // The DownloadManager uses the history service for storing persistent 21 // The DownloadManager uses the history service for storing persistent
22 // information about the state of all downloads. The history system maintains a 22 // information about the state of all downloads. The history system maintains a
23 // separate table for this called 'downloads'. At the point that the 23 // separate table for this called 'downloads'. At the point that the
24 // DownloadManager is constructed, we query the history service for the state of 24 // DownloadManager is constructed, we query the history service for the state of
25 // all persisted downloads. 25 // all persisted downloads.
26 26
27 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ 27 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_
28 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ 28 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_
29 #pragma once 29 #pragma once
30 30
31 #include <map> 31 #include <map>
32 #include <set> 32 #include <set>
33 #include <string> 33 #include <string>
34 #include <vector> 34 #include <vector>
35 35
36 #include "base/basictypes.h" 36 #include "base/basictypes.h"
37 #include "base/file_path.h" 37 #include "base/file_path.h"
38 #include "base/gtest_prod_util.h" 38 #include "base/gtest_prod_util.h"
39 #include "base/hash_tables.h" 39 #include "base/hash_tables.h"
40 #include "base/memory/ref_counted.h" 40 #include "base/memory/ref_counted.h"
41 #include "base/memory/scoped_ptr.h" 41 #include "base/memory/scoped_ptr.h"
42 #include "base/memory/weak_ptr.h" 42 #include "base/memory/weak_ptr.h"
43 #include "base/observer_list.h" 43 #include "base/observer_list.h"
44 #include "base/time.h" 44 #include "base/time.h"
45 #include "chrome/browser/download/download_item.h"
46 #include "chrome/browser/download/download_request_handle.h"
47 #include "chrome/browser/download/download_status_updater_delegate.h"
48 #include "content/browser/browser_thread.h" 45 #include "content/browser/browser_thread.h"
46 #include "content/browser/download/download_item.h"
47 #include "content/browser/download/download_request_handle.h"
48 #include "content/browser/download/download_status_updater_delegate.h"
49 49
50 class DownloadFileManager; 50 class DownloadFileManager;
51 class DownloadHistory; 51 class DownloadHistory;
52 class DownloadManagerDelegate; 52 class DownloadManagerDelegate;
53 class DownloadPrefs; 53 class DownloadPrefs;
54 class DownloadStatusUpdater; 54 class DownloadStatusUpdater;
55 class GURL; 55 class GURL;
56 class Profile; 56 class Profile;
57 class ResourceDispatcherHost; 57 class ResourceDispatcherHost;
58 class TabContents; 58 class TabContents;
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 int32 next_save_page_id_; 408 int32 next_save_page_id_;
409 409
410 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_; 410 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_;
411 411
412 // Allows an embedder to control behavior. Guaranteed to outlive this object. 412 // Allows an embedder to control behavior. Guaranteed to outlive this object.
413 DownloadManagerDelegate* delegate_; 413 DownloadManagerDelegate* delegate_;
414 414
415 DISALLOW_COPY_AND_ASSIGN(DownloadManager); 415 DISALLOW_COPY_AND_ASSIGN(DownloadManager);
416 }; 416 };
417 417
418 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ 418 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698