| 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 #include "chrome/browser/download/save_package.h" | 5 #include "chrome/browser/download/save_package.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 suggested_path, | 1034 suggested_path, |
| 1035 filter, | 1035 filter, |
| 1036 filter_index, | 1036 filter_index, |
| 1037 default_extension, | 1037 default_extension, |
| 1038 platform_util::GetTopLevel( | 1038 platform_util::GetTopLevel( |
| 1039 web_contents_->GetNativeView()), | 1039 web_contents_->GetNativeView()), |
| 1040 save_params); | 1040 save_params); |
| 1041 } else | 1041 } else |
| 1042 #endif // defined(OS_LINUX) || defined(OS_WIN) | 1042 #endif // defined(OS_LINUX) || defined(OS_WIN) |
| 1043 { | 1043 { |
| 1044 // Just use 'suggested_name' instead of opening the dialog prompt. | 1044 // Just use 'suggested_path' instead of opening the dialog prompt. |
| 1045 ContinueSave(save_params, suggested_path, filter_index); | 1045 ContinueSave(save_params, suggested_path, filter_index); |
| 1046 delete save_params; | 1046 delete save_params; |
| 1047 } | 1047 } |
| 1048 } | 1048 } |
| 1049 | 1049 |
| 1050 // Called after the save file dialog box returns. | 1050 // Called after the save file dialog box returns. |
| 1051 void SavePackage::ContinueSave(SavePackageParam* param, | 1051 void SavePackage::ContinueSave(SavePackageParam* param, |
| 1052 const FilePath& final_name, | 1052 const FilePath& final_name, |
| 1053 int index) { | 1053 int index) { |
| 1054 // Ensure the filename is safe. | 1054 // Ensure the filename is safe. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 int index, void* params) { | 1145 int index, void* params) { |
| 1146 SavePackageParam* save_params = reinterpret_cast<SavePackageParam*>(params); | 1146 SavePackageParam* save_params = reinterpret_cast<SavePackageParam*>(params); |
| 1147 ContinueSave(save_params, path, index); | 1147 ContinueSave(save_params, path, index); |
| 1148 delete save_params; | 1148 delete save_params; |
| 1149 } | 1149 } |
| 1150 | 1150 |
| 1151 void SavePackage::FileSelectionCanceled(void* params) { | 1151 void SavePackage::FileSelectionCanceled(void* params) { |
| 1152 SavePackageParam* save_params = reinterpret_cast<SavePackageParam*>(params); | 1152 SavePackageParam* save_params = reinterpret_cast<SavePackageParam*>(params); |
| 1153 delete save_params; | 1153 delete save_params; |
| 1154 } | 1154 } |
| OLD | NEW |