| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common/extensions/unpacker.h" | 5 #include "chrome/common/extensions/unpacker.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| 11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
| 12 #include "base/json/json_file_value_serializer.h" | 12 #include "base/json/json_file_value_serializer.h" |
| 13 #include "base/memory/scoped_handle.h" | 13 #include "base/memory/scoped_handle.h" |
| 14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 15 #include "base/threading/thread.h" | 15 #include "base/threading/thread.h" |
| 16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
| 17 #include "base/values.h" | 17 #include "base/values.h" |
| 18 #include "chrome/common/extensions/api/i18n/default_locale_handler.h" | 18 #include "chrome/common/extensions/api/i18n/default_locale_handler.h" |
| 19 #include "chrome/common/extensions/extension.h" | 19 #include "chrome/common/extensions/extension.h" |
| 20 #include "chrome/common/extensions/extension_file_util.h" | 20 #include "chrome/common/extensions/extension_file_util.h" |
| 21 #include "chrome/common/extensions/extension_l10n_util.h" | 21 #include "chrome/common/extensions/extension_l10n_util.h" |
| 22 #include "chrome/common/extensions/extension_manifest_constants.h" | 22 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 23 #include "chrome/common/extensions/manifest.h" | 23 #include "chrome/common/extensions/manifest.h" |
| 24 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" |
| 25 #include "components/zip/zip.h" | |
| 26 #include "content/public/common/common_param_traits.h" | 25 #include "content/public/common/common_param_traits.h" |
| 27 #include "extensions/common/constants.h" | 26 #include "extensions/common/constants.h" |
| 28 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
| 29 #include "ipc/ipc_message_utils.h" | 28 #include "ipc/ipc_message_utils.h" |
| 30 #include "net/base/file_stream.h" | 29 #include "net/base/file_stream.h" |
| 31 #include "third_party/skia/include/core/SkBitmap.h" | 30 #include "third_party/skia/include/core/SkBitmap.h" |
| 31 #include "third_party/zlib/google/zip.h" |
| 32 #include "ui/base/l10n/l10n_util.h" | 32 #include "ui/base/l10n/l10n_util.h" |
| 33 #include "webkit/glue/image_decoder.h" | 33 #include "webkit/glue/image_decoder.h" |
| 34 | 34 |
| 35 namespace errors = extension_manifest_errors; | 35 namespace errors = extension_manifest_errors; |
| 36 namespace keys = extension_manifest_keys; | 36 namespace keys = extension_manifest_keys; |
| 37 namespace filenames = extension_filenames; | 37 namespace filenames = extension_filenames; |
| 38 | 38 |
| 39 namespace { | 39 namespace { |
| 40 | 40 |
| 41 // A limit to stop us passing dangerously large canvases to the browser. | 41 // A limit to stop us passing dangerously large canvases to the browser. |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 | 335 |
| 336 void Unpacker::SetError(const std::string &error) { | 336 void Unpacker::SetError(const std::string &error) { |
| 337 SetUTF16Error(UTF8ToUTF16(error)); | 337 SetUTF16Error(UTF8ToUTF16(error)); |
| 338 } | 338 } |
| 339 | 339 |
| 340 void Unpacker::SetUTF16Error(const string16 &error) { | 340 void Unpacker::SetUTF16Error(const string16 &error) { |
| 341 error_message_ = error; | 341 error_message_ = error; |
| 342 } | 342 } |
| 343 | 343 |
| 344 } // namespace extensions | 344 } // namespace extensions |
| OLD | NEW |