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

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

Issue 6995013: More progress towards removing content settings code from the content layer. We can't use Cookie... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments and sync Created 9 years, 7 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:
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 class DownloadItem; 50 class DownloadItem;
51 class DownloadPrefs; 51 class DownloadPrefs;
52 class DownloadStatusUpdater; 52 class DownloadStatusUpdater;
53 class GURL; 53 class GURL;
54 class Profile; 54 class Profile;
55 class ResourceDispatcherHost; 55 class ResourceDispatcherHost;
56 class TabContents; 56 class TabContents;
57 struct DownloadCreateInfo; 57 struct DownloadCreateInfo;
58 struct DownloadSaveInfo; 58 struct DownloadSaveInfo;
59 59
60 namespace net {
61 class URLRequestContextGetter;
62 }
63
64 // Browser's download manager: manages all downloads and destination view. 60 // Browser's download manager: manages all downloads and destination view.
65 class DownloadManager 61 class DownloadManager
66 : public base::RefCountedThreadSafe<DownloadManager, 62 : public base::RefCountedThreadSafe<DownloadManager,
67 BrowserThread::DeleteOnUIThread>, 63 BrowserThread::DeleteOnUIThread>,
68 public DownloadStatusUpdaterDelegate, 64 public DownloadStatusUpdaterDelegate,
69 public SelectFileDialog::Listener { 65 public SelectFileDialog::Listener {
70 public: 66 public:
71 explicit DownloadManager(DownloadStatusUpdater* status_updater); 67 explicit DownloadManager(DownloadStatusUpdater* status_updater);
72 68
73 // Shutdown the download manager. Must be called before destruction. 69 // Shutdown the download manager. Must be called before destruction.
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 #endif 364 #endif
369 365
370 // True if the download manager has been initialized and requires a shutdown. 366 // True if the download manager has been initialized and requires a shutdown.
371 bool shutdown_needed_; 367 bool shutdown_needed_;
372 368
373 // Observers that want to be notified of changes to the set of downloads. 369 // Observers that want to be notified of changes to the set of downloads.
374 ObserverList<Observer> observers_; 370 ObserverList<Observer> observers_;
375 371
376 // The current active profile. 372 // The current active profile.
377 Profile* profile_; 373 Profile* profile_;
378 scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
379 374
380 scoped_ptr<DownloadHistory> download_history_; 375 scoped_ptr<DownloadHistory> download_history_;
381 376
382 scoped_ptr<DownloadPrefs> download_prefs_; 377 scoped_ptr<DownloadPrefs> download_prefs_;
383 378
384 // Non-owning pointer for handling file writing on the download_thread_. 379 // Non-owning pointer for handling file writing on the download_thread_.
385 DownloadFileManager* file_manager_; 380 DownloadFileManager* file_manager_;
386 381
387 // Non-owning pointer for updating the download status. 382 // Non-owning pointer for updating the download status.
388 base::WeakPtr<DownloadStatusUpdater> status_updater_; 383 base::WeakPtr<DownloadStatusUpdater> status_updater_;
389 384
390 // The user's last choice for download directory. This is only used when the 385 // The user's last choice for download directory. This is only used when the
391 // user wants us to prompt for a save location for each download. 386 // user wants us to prompt for a save location for each download.
392 FilePath last_download_path_; 387 FilePath last_download_path_;
393 388
394 // The "Save As" dialog box used to ask the user where a file should be 389 // The "Save As" dialog box used to ask the user where a file should be
395 // saved. 390 // saved.
396 scoped_refptr<SelectFileDialog> select_file_dialog_; 391 scoped_refptr<SelectFileDialog> select_file_dialog_;
397 392
398 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_; 393 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_;
399 394
400 DISALLOW_COPY_AND_ASSIGN(DownloadManager); 395 DISALLOW_COPY_AND_ASSIGN(DownloadManager);
401 }; 396 };
402 397
403 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ 398 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/download/download_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698