| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // Download utility implementation | 5 // Download utility implementation |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "chrome/browser/download/download_util.h" | 9 #include "chrome/browser/download/download_util.h" |
| 10 | 10 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 OpenDownload(download_); | 126 OpenDownload(download_); |
| 127 break; | 127 break; |
| 128 case ALWAYS_OPEN_TYPE: { | 128 case ALWAYS_OPEN_TYPE: { |
| 129 const std::wstring extension = | 129 const std::wstring extension = |
| 130 file_util::GetFileExtensionFromPath(download_->full_path()); | 130 file_util::GetFileExtensionFromPath(download_->full_path()); |
| 131 download_->manager()->OpenFilesOfExtension( | 131 download_->manager()->OpenFilesOfExtension( |
| 132 extension, !IsItemChecked(ALWAYS_OPEN_TYPE)); | 132 extension, !IsItemChecked(ALWAYS_OPEN_TYPE)); |
| 133 break; | 133 break; |
| 134 } | 134 } |
| 135 case REMOVE_ITEM: | 135 case REMOVE_ITEM: |
| 136 download_->Remove(); | 136 download_->Remove(false); |
| 137 break; | 137 break; |
| 138 case CANCEL: | 138 case CANCEL: |
| 139 download_->Cancel(true); | 139 download_->Cancel(true); |
| 140 break; | 140 break; |
| 141 default: | 141 default: |
| 142 NOTREACHED(); | 142 NOTREACHED(); |
| 143 } | 143 } |
| 144 } | 144 } |
| 145 | 145 |
| 146 // DownloadShelfContextMenu ---------------------------------------------------- | 146 // DownloadShelfContextMenu ---------------------------------------------------- |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 | 398 |
| 399 // Run the drag and drop loop | 399 // Run the drag and drop loop |
| 400 DWORD effects; | 400 DWORD effects; |
| 401 DoDragDrop(data.get(), drag_source.get(), DROPEFFECT_COPY | DROPEFFECT_LINK, | 401 DoDragDrop(data.get(), drag_source.get(), DROPEFFECT_COPY | DROPEFFECT_LINK, |
| 402 &effects); | 402 &effects); |
| 403 } | 403 } |
| 404 | 404 |
| 405 | 405 |
| 406 } // namespace download_util | 406 } // namespace download_util |
| 407 | 407 |
| OLD | NEW |