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

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

Issue 2457923002: Remove stl_util's deletion function use and ScopedVector from chrome/browser/download/. (Closed)
Patch Set: sky Created 4 years, 1 month 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
OLDNEW
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_STATUS_UPDATER_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_STATUS_UPDATER_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_STATUS_UPDATER_H_ 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_STATUS_UPDATER_H_
7 7
8 #include <memory>
8 #include <set> 9 #include <set>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "chrome/browser/download/all_download_item_notifier.h" 12 #include "chrome/browser/download/all_download_item_notifier.h"
12 #include "content/public/browser/download_item.h" 13 #include "content/public/browser/download_item.h"
13 #include "content/public/browser/download_manager.h" 14 #include "content/public/browser/download_manager.h"
14 15
15 // Keeps track of download progress for the entire browser. 16 // Keeps track of download progress for the entire browser.
16 class DownloadStatusUpdater 17 class DownloadStatusUpdater
17 : public AllDownloadItemNotifier::Observer { 18 : public AllDownloadItemNotifier::Observer {
(...skipping 21 matching lines...) Expand all
39 content::DownloadItem* item) override; 40 content::DownloadItem* item) override;
40 41
41 protected: 42 protected:
42 // Platform-specific function to update the platform UI for download progress. 43 // Platform-specific function to update the platform UI for download progress.
43 // |download| is the download item that changed. Implementations should not 44 // |download| is the download item that changed. Implementations should not
44 // hold the value of |download| as it is not guaranteed to remain valid. 45 // hold the value of |download| as it is not guaranteed to remain valid.
45 // Virtual to be overridable for testing. 46 // Virtual to be overridable for testing.
46 virtual void UpdateAppIconDownloadProgress(content::DownloadItem* download); 47 virtual void UpdateAppIconDownloadProgress(content::DownloadItem* download);
47 48
48 private: 49 private:
49 std::vector<AllDownloadItemNotifier*> notifiers_; 50 std::vector<std::unique_ptr<AllDownloadItemNotifier>> notifiers_;
50 51
51 DISALLOW_COPY_AND_ASSIGN(DownloadStatusUpdater); 52 DISALLOW_COPY_AND_ASSIGN(DownloadStatusUpdater);
52 }; 53 };
53 54
54 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_STATUS_UPDATER_H_ 55 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_STATUS_UPDATER_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_query_unittest.cc ('k') | chrome/browser/download/download_status_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698