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

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

Issue 10704052: Download filename determination refactor (3/3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 5 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) 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 #include "chrome/browser/download/download_status_updater.h" 5 #include "chrome/browser/download/download_status_updater.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 void DownloadStatusUpdater::ManagerGoingDown( 66 void DownloadStatusUpdater::ManagerGoingDown(
67 content::DownloadManager* manager) { 67 content::DownloadManager* manager) {
68 DCHECK(ContainsKey(managers_, manager)); 68 DCHECK(ContainsKey(managers_, manager));
69 managers_.erase(manager); 69 managers_.erase(manager);
70 manager->RemoveObserver(this); 70 manager->RemoveObserver(this);
71 // Item removal will be handled in response to DownloadItem REMOVING 71 // Item removal will be handled in response to DownloadItem REMOVING
72 // notification (in the !IN_PROGRESS conditional branch in UpdateItem). 72 // notification (in the !IN_PROGRESS conditional branch in UpdateItem).
73 } 73 }
74 74
75 void DownloadStatusUpdater::SelectFileDialogDisplayed(
76 content::DownloadManager* manager, int32 id) {
77 }
78
79 // Methods inherited from content::DownloadItem::Observer. 75 // Methods inherited from content::DownloadItem::Observer.
80 void DownloadStatusUpdater::OnDownloadUpdated( 76 void DownloadStatusUpdater::OnDownloadUpdated(
81 content::DownloadItem* download) { 77 content::DownloadItem* download) {
82 UpdateItem(download); 78 UpdateItem(download);
83 UpdateAppIconDownloadProgress(); 79 UpdateAppIconDownloadProgress();
84 } 80 }
85 81
86 void DownloadStatusUpdater::OnDownloadOpened(content::DownloadItem* download) { 82 void DownloadStatusUpdater::OnDownloadOpened(content::DownloadItem* download) {
87 } 83 }
88 84
(...skipping 16 matching lines...) Expand all
105 items_.insert(download); 101 items_.insert(download);
106 download->AddObserver(this); 102 download->AddObserver(this);
107 } 103 }
108 } else { 104 } else {
109 if (ContainsKey(items_, download)) { 105 if (ContainsKey(items_, download)) {
110 items_.erase(download); 106 items_.erase(download);
111 download->RemoveObserver(this); 107 download->RemoveObserver(this);
112 } 108 }
113 } 109 }
114 } 110 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698