OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/download/save_package.h" | 5 #include "content/browser/download/save_package.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/i18n/file_util_icu.h" | 11 #include "base/i18n/file_util_icu.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "base/stl_util-inl.h" | 14 #include "base/stl_util.h" |
15 #include "base/string_piece.h" | 15 #include "base/string_piece.h" |
16 #include "base/string_split.h" | 16 #include "base/string_split.h" |
17 #include "base/sys_string_conversions.h" | 17 #include "base/sys_string_conversions.h" |
18 #include "base/task.h" | 18 #include "base/task.h" |
19 #include "base/threading/thread.h" | 19 #include "base/threading/thread.h" |
20 #include "base/utf_string_conversions.h" | 20 #include "base/utf_string_conversions.h" |
21 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
22 #include "chrome/browser/download/download_item.h" | 22 #include "chrome/browser/download/download_item.h" |
23 #include "chrome/browser/download/download_item_model.h" | 23 #include "chrome/browser/download/download_item_model.h" |
24 #include "chrome/browser/download/download_manager.h" | 24 #include "chrome/browser/download/download_manager.h" |
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 bool SavePackage::IsSavableContents(const std::string& contents_mime_type) { | 1326 bool SavePackage::IsSavableContents(const std::string& contents_mime_type) { |
1327 // WebKit creates Document object when MIME type is application/xhtml+xml, | 1327 // WebKit creates Document object when MIME type is application/xhtml+xml, |
1328 // so we also support this MIME type. | 1328 // so we also support this MIME type. |
1329 return contents_mime_type == "text/html" || | 1329 return contents_mime_type == "text/html" || |
1330 contents_mime_type == "text/xml" || | 1330 contents_mime_type == "text/xml" || |
1331 contents_mime_type == "application/xhtml+xml" || | 1331 contents_mime_type == "application/xhtml+xml" || |
1332 contents_mime_type == "text/plain" || | 1332 contents_mime_type == "text/plain" || |
1333 contents_mime_type == "text/css" || | 1333 contents_mime_type == "text/css" || |
1334 net::IsSupportedJavascriptMimeType(contents_mime_type.c_str()); | 1334 net::IsSupportedJavascriptMimeType(contents_mime_type.c_str()); |
1335 } | 1335 } |
OLD | NEW |