Chromium Code Reviews| Index: content/browser/download/download_item_impl.cc |
| diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc |
| index a3e72ffa469e50f0efd18f92c63a50c2a99e0e16..b1c7655e257c0fe6ad8ee94661f14f6f94bbef05 100644 |
| --- a/content/browser/download/download_item_impl.cc |
| +++ b/content/browser/download/download_item_impl.cc |
| @@ -753,6 +753,7 @@ void DownloadItemImpl::OnDownloadRenamedToFinalName( |
| target_path_ = full_path; |
| SetFullPath(full_path); |
| delegate_->DownloadRenamedToFinalName(this); |
| + UpdateObservers(); |
|
Randy Smith (Not in Mondays)
2012/07/19 17:25:36
I don't think this is necessary--the notification
benjhayden
2012/07/23 15:58:42
Done.
|
| // Complete the download and release the DownloadFile. |
| BrowserThread::PostTask( |
| @@ -871,10 +872,11 @@ void DownloadItemImpl::OnTargetPathDetermined( |
| const FilePath& target_path, |
| TargetDisposition disposition, |
| content::DownloadDangerType danger_type) { |
| - // TODO(rdsmith): Change to DCHECK after http://crbug.com/85408 resolved. |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| target_path_ = target_path; |
| target_disposition_ = disposition; |
| + UpdateObservers(); |
| + // SetDangerType() may call UpdateObservers() again. |
|
Randy Smith (Not in Mondays)
2012/07/19 17:25:36
This seems like avoidable redundancy; would it mak
asanka
2012/07/19 18:14:07
+1 to avoiding an additional UpdateObservers() cal
Randy Smith (Not in Mondays)
2012/07/19 18:16:51
I'm thinking this means we should hoist the Update
benjhayden
2012/07/23 15:58:42
Pending discussion with Asanka re FND3.
asanka
2012/07/23 19:10:21
My suggestion is to pull the UpdateObservers() cal
benjhayden
2012/07/25 16:24:38
Done.
|
| SetDangerType(danger_type); |
| } |
| @@ -882,6 +884,7 @@ void DownloadItemImpl::OnTargetPathSelected(const FilePath& target_path) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| DCHECK_EQ(TARGET_DISPOSITION_PROMPT, target_disposition_); |
| target_path_ = target_path; |
| + UpdateObservers(); |
|
Randy Smith (Not in Mondays)
2012/07/19 17:25:36
This also seems redundant, especially since when A
asanka
2012/07/19 18:14:07
I think the UpdateObservers() call in OnDownloadRe
benjhayden
2012/07/23 15:58:42
Pending discussion with Asanka re FND3.
asanka
2012/07/23 19:10:21
As above, I think we shouldn't call UpdateObserver
benjhayden
2012/07/25 16:24:38
Done.
|
| } |
| void DownloadItemImpl::OnContentCheckCompleted( |
| @@ -917,6 +920,7 @@ FilePath DownloadItemImpl::GetFileNameToReportUser() const { |
| void DownloadItemImpl::SetDisplayName(const FilePath& name) { |
| display_name_ = name; |
| + UpdateObservers(); |
|
asanka
2012/07/19 18:14:07
Same as above. This is an intermediate state that
benjhayden
2012/07/23 15:58:42
Done.
|
| } |
| FilePath DownloadItemImpl::GetUserVerifiedFilePath() const { |