| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_manager.h" | 5 #include "chrome/browser/download/download_manager.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "chrome/common/notification_type.h" | 39 #include "chrome/common/notification_type.h" |
| 40 #include "chrome/common/pref_names.h" | 40 #include "chrome/common/pref_names.h" |
| 41 #include "googleurl/src/gurl.h" | 41 #include "googleurl/src/gurl.h" |
| 42 #include "grit/generated_resources.h" | 42 #include "grit/generated_resources.h" |
| 43 #include "grit/theme_resources.h" | 43 #include "grit/theme_resources.h" |
| 44 #include "net/base/mime_util.h" | 44 #include "net/base/mime_util.h" |
| 45 #include "net/base/net_util.h" | 45 #include "net/base/net_util.h" |
| 46 | 46 |
| 47 #if defined(OS_WIN) | 47 #if defined(OS_WIN) |
| 48 #include "app/win_util.h" | 48 #include "app/win_util.h" |
| 49 #include "base/registry.h" | |
| 50 #include "base/win_util.h" | |
| 51 #endif | 49 #endif |
| 52 | 50 |
| 53 namespace { | 51 namespace { |
| 54 | 52 |
| 55 // Used to sort download items based on descending start time. | 53 // Used to sort download items based on descending start time. |
| 56 bool CompareStartTime(DownloadItem* first, DownloadItem* second) { | 54 bool CompareStartTime(DownloadItem* first, DownloadItem* second) { |
| 57 return first->start_time() > second->start_time(); | 55 return first->start_time() > second->start_time(); |
| 58 } | 56 } |
| 59 | 57 |
| 60 void DeleteDownloadedFile(const FilePath& path) { | 58 void DeleteDownloadedFile(const FilePath& path) { |
| (...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1419 observed_download_manager_->RemoveObserver(this); | 1417 observed_download_manager_->RemoveObserver(this); |
| 1420 } | 1418 } |
| 1421 | 1419 |
| 1422 void DownloadManager::OtherDownloadManagerObserver::ModelChanged() { | 1420 void DownloadManager::OtherDownloadManagerObserver::ModelChanged() { |
| 1423 observing_download_manager_->NotifyModelChanged(); | 1421 observing_download_manager_->NotifyModelChanged(); |
| 1424 } | 1422 } |
| 1425 | 1423 |
| 1426 void DownloadManager::OtherDownloadManagerObserver::ManagerGoingDown() { | 1424 void DownloadManager::OtherDownloadManagerObserver::ManagerGoingDown() { |
| 1427 observed_download_manager_ = NULL; | 1425 observed_download_manager_ = NULL; |
| 1428 } | 1426 } |
| OLD | NEW |