OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "chrome/common/pref_names.h" | 31 #include "chrome/common/pref_names.h" |
32 #include "chrome/common/pref_service.h" | 32 #include "chrome/common/pref_service.h" |
33 #include "chrome/common/url_constants.h" | 33 #include "chrome/common/url_constants.h" |
34 #include "grit/generated_resources.h" | 34 #include "grit/generated_resources.h" |
35 #include "net/base/io_buffer.h" | 35 #include "net/base/io_buffer.h" |
36 #include "net/base/mime_util.h" | 36 #include "net/base/mime_util.h" |
37 #include "net/base/net_util.h" | 37 #include "net/base/net_util.h" |
38 #include "net/url_request/url_request_context.h" | 38 #include "net/url_request/url_request_context.h" |
39 #include "webkit/glue/dom_serializer_delegate.h" | 39 #include "webkit/glue/dom_serializer_delegate.h" |
40 | 40 |
41 #if defined(OS_WIN) | |
42 #include "base/win_util.h" | |
43 #include "chrome/common/win_util.h" | |
44 #endif | |
45 | |
46 using base::Time; | 41 using base::Time; |
47 | 42 |
48 // This structure is for storing parameters which we will use to create a | 43 // This structure is for storing parameters which we will use to create a |
49 // SavePackage object later. | 44 // SavePackage object later. |
50 struct SavePackageParam { | 45 struct SavePackageParam { |
51 // MIME type of current tab contents. | 46 // MIME type of current tab contents. |
52 const std::string current_tab_mime_type; | 47 const std::string current_tab_mime_type; |
53 // Pointer to preference service. | 48 // Pointer to preference service. |
54 SavePackage::SavePackageType save_type; | 49 SavePackage::SavePackageType save_type; |
55 // File path for main html file. | 50 // File path for main html file. |
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 int index, void* params) { | 1141 int index, void* params) { |
1147 SavePackageParam* save_params = reinterpret_cast<SavePackageParam*>(params); | 1142 SavePackageParam* save_params = reinterpret_cast<SavePackageParam*>(params); |
1148 ContinueSave(save_params, path, index); | 1143 ContinueSave(save_params, path, index); |
1149 delete save_params; | 1144 delete save_params; |
1150 } | 1145 } |
1151 | 1146 |
1152 void SavePackage::FileSelectionCanceled(void* params) { | 1147 void SavePackage::FileSelectionCanceled(void* params) { |
1153 SavePackageParam* save_params = reinterpret_cast<SavePackageParam*>(params); | 1148 SavePackageParam* save_params = reinterpret_cast<SavePackageParam*>(params); |
1154 delete save_params; | 1149 delete save_params; |
1155 } | 1150 } |
OLD | NEW |