diff options
42 files changed, 70 insertions, 142 deletions
diff --git a/build/android/pylib/gtest/test_runner.py b/build/android/pylib/gtest/test_runner.py index 08ab8a1..bdbfa60 100644 --- a/build/android/pylib/gtest/test_runner.py +++ b/build/android/pylib/gtest/test_runner.py @@ -68,6 +68,7 @@ def _GetDataFilesForTestSuite(test_suite_basename): 'chrome/third_party/mock4js/', 'net/data/ssl/certificates', 'third_party/accessibility-developer-tools/gen/axs_testing.js', + 'third_party/zlib/google/test/data', ] # The following are spell check data. Now only list the data under # third_party/hunspell_dictionaries which are used by unit tests. @@ -76,10 +77,6 @@ def _GetDataFilesForTestSuite(test_suite_basename): test_files += glob.glob('third_party/hunspell_dictionaries/*.bdic') os.chdir(old_cwd) return test_files - elif test_suite_basename == 'components_unittests': - return [ - 'components/test/data/zip', - ] elif test_suite_basename == 'media_unittests': return [ 'media/test/data', diff --git a/chrome/DEPS b/chrome/DEPS index 358576c..66a1c42 100644 --- a/chrome/DEPS +++ b/chrome/DEPS @@ -26,7 +26,6 @@ include_rules = [ "+chrome/test", "+components/sessions", "+components/visitedlink/common", - "+components/zip", "+content/public/common", "+content/public/test", "+content/test/gpu", @@ -50,6 +49,7 @@ include_rules = [ "+third_party/npapi", # NPAPI interface headers. "+third_party/skia", "+third_party/tcmalloc", + "+third_party/zlib/google", "+third_party/GTM", # Google Toolbox for Mac. "+ui", diff --git a/chrome/browser/chromeos/imageburner/burn_manager.cc b/chrome/browser/chromeos/imageburner/burn_manager.cc index c875b8d..133c06d 100644 --- a/chrome/browser/chromeos/imageburner/burn_manager.cc +++ b/chrome/browser/chromeos/imageburner/burn_manager.cc @@ -13,12 +13,12 @@ #include "chromeos/dbus/image_burner_client.h" #include "chromeos/network/network_state.h" #include "chromeos/network/network_state_handler.h" -#include "components/zip/zip.h" #include "content/public/browser/browser_thread.h" #include "grit/generated_resources.h" #include "net/url_request/url_fetcher.h" #include "net/url_request/url_request_context_getter.h" #include "net/url_request/url_request_status.h" +#include "third_party/zlib/google/zip.h" using content::BrowserThread; diff --git a/chrome/browser/component_updater/component_unpacker.cc b/chrome/browser/component_updater/component_unpacker.cc index 836b0c1..789448d 100644 --- a/chrome/browser/component_updater/component_unpacker.cc +++ b/chrome/browser/component_updater/component_unpacker.cc @@ -14,10 +14,10 @@ #include "base/strings/string_number_conversions.h" #include "chrome/browser/component_updater/component_updater_service.h" #include "chrome/common/extensions/extension_constants.h" -#include "components/zip/zip.h" #include "crypto/secure_hash.h" #include "crypto/signature_verifier.h" #include "extensions/common/crx_file.h" +#include "third_party/zlib/google/zip.h" using crypto::SecureHash; diff --git a/chrome/browser/extensions/extension_creator.cc b/chrome/browser/extensions/extension_creator.cc index b7724c0..6efc50c 100644 --- a/chrome/browser/extensions/extension_creator.cc +++ b/chrome/browser/extensions/extension_creator.cc @@ -16,12 +16,12 @@ #include "chrome/browser/extensions/extension_creator_filter.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_file_util.h" -#include "components/zip/zip.h" #include "crypto/rsa_private_key.h" #include "crypto/signature_creator.h" #include "extensions/common/crx_file.h" #include "extensions/common/id_util.h" #include "grit/generated_resources.h" +#include "third_party/zlib/google/zip.h" #include "ui/base/l10n/l10n_util.h" namespace { diff --git a/chrome/browser/feedback/feedback_data.cc b/chrome/browser/feedback/feedback_data.cc index 8c394d6..5967b76 100644 --- a/chrome/browser/feedback/feedback_data.cc +++ b/chrome/browser/feedback/feedback_data.cc @@ -20,7 +20,7 @@ #endif #if defined(OS_CHROMEOS) -#include "components/zip/zip.h" +#include "third_party/zlib/google/zip.h" #endif using content::BrowserThread; diff --git a/chrome/browser/safe_browsing/download_protection_service_unittest.cc b/chrome/browser/safe_browsing/download_protection_service_unittest.cc index af98856..657e189 100644 --- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc +++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc @@ -23,7 +23,6 @@ #include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/browser/safe_browsing/signature_util.h" #include "chrome/common/safe_browsing/csd.pb.h" -#include "components/zip/zip.h" #include "content/public/test/mock_download_item.h" #include "content/public/test/test_browser_thread.h" #include "googleurl/src/gurl.h" @@ -32,6 +31,7 @@ #include "net/url_request/url_fetcher_delegate.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/zlib/google/zip.h" using ::testing::ContainerEq; using ::testing::DoAll; diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 4022044..4bb2681 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -50,6 +50,7 @@ '../third_party/libjingle/libjingle.gyp:libjingle', '../third_party/libxml/libxml.gyp:libxml', '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h', + '../third_party/zlib/zlib.gyp:zip', '../third_party/zlib/zlib.gyp:minizip', '../third_party/zlib/zlib.gyp:zlib', '../ui/base/strings/ui_strings.gyp:ui_strings', diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi index d8e6a24..f7aa509 100644 --- a/chrome/chrome_common.gypi +++ b/chrome/chrome_common.gypi @@ -38,7 +38,6 @@ '<(DEPTH)/chrome/chrome_resources.gyp:theme_resources', '<(DEPTH)/chrome/common_constants.gyp:common_constants', '<(DEPTH)/components/components.gyp:visitedlink_common', - '<(DEPTH)/components/components.gyp:zip', '<(DEPTH)/content/content.gyp:content_common', '<(DEPTH)/net/net.gyp:net', '<(DEPTH)/skia/skia.gyp:skia', @@ -48,6 +47,7 @@ '<(DEPTH)/third_party/libxml/libxml.gyp:libxml', '<(DEPTH)/third_party/mt19937ar/mt19937ar.gyp:mt19937ar', '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite', + '<(DEPTH)/third_party/zlib/zlib.gyp:zip', '<(DEPTH)/ui/ui.gyp:ui_resources', '<(DEPTH)/webkit/support/webkit_support.gyp:user_agent', ], diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi index b112d09..ee8b64e 100644 --- a/chrome/chrome_tests_unit.gypi +++ b/chrome/chrome_tests_unit.gypi @@ -1778,6 +1778,8 @@ '../skia/ext/vector_canvas_unittest.cc', '../testing/gtest_mac_unittest.mm', '../third_party/cld/encodings/compact_lang_det/compact_lang_det_unittest_small.cc', + '../third_party/zlib/google/zip_reader_unittest.cc', + '../third_party/zlib/google/zip_unittest.cc', '../tools/json_schema_compiler/test/additional_properties_unittest.cc', '../tools/json_schema_compiler/test/any_unittest.cc', '../tools/json_schema_compiler/test/arrays_unittest.cc', diff --git a/chrome/common/extensions/unpacker.cc b/chrome/common/extensions/unpacker.cc index 085bc86..0cf8d94 100644 --- a/chrome/common/extensions/unpacker.cc +++ b/chrome/common/extensions/unpacker.cc @@ -22,13 +22,13 @@ #include "chrome/common/extensions/extension_manifest_constants.h" #include "chrome/common/extensions/manifest.h" #include "chrome/common/url_constants.h" -#include "components/zip/zip.h" #include "content/public/common/common_param_traits.h" #include "extensions/common/constants.h" #include "grit/generated_resources.h" #include "ipc/ipc_message_utils.h" #include "net/base/file_stream.h" #include "third_party/skia/include/core/SkBitmap.h" +#include "third_party/zlib/google/zip.h" #include "ui/base/l10n/l10n_util.h" #include "webkit/glue/image_decoder.h" diff --git a/chrome/common/safe_browsing/zip_analyzer.cc b/chrome/common/safe_browsing/zip_analyzer.cc index b49ab22..394520a 100644 --- a/chrome/common/safe_browsing/zip_analyzer.cc +++ b/chrome/common/safe_browsing/zip_analyzer.cc @@ -6,7 +6,7 @@ #include "base/logging.h" #include "chrome/common/safe_browsing/download_protection_util.h" -#include "components/zip/zip_reader.h" +#include "third_party/zlib/google/zip_reader.h" namespace safe_browsing { namespace zip_analyzer { diff --git a/chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc b/chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc index c7131a5..c9c0f2e 100644 --- a/chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc +++ b/chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc @@ -10,8 +10,8 @@ #include "chrome/common/chrome_switches.h" #include "chrome/test/webdriver/webdriver_capabilities_parser.h" #include "chrome/test/webdriver/webdriver_logging.h" -#include "components/zip/zip.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/zlib/google/zip.h" using base::DictionaryValue; using base::ListValue; diff --git a/chrome/test/webdriver/webdriver_util.cc b/chrome/test/webdriver/webdriver_util.cc index eba3916..274144c 100644 --- a/chrome/test/webdriver/webdriver_util.cc +++ b/chrome/test/webdriver/webdriver_util.cc @@ -20,7 +20,7 @@ #include "base/third_party/icu/icu_utf.h" #include "chrome/common/automation_id.h" #include "chrome/test/automation/automation_json_requests.h" -#include "components/zip/zip.h" +#include "third_party/zlib/google/zip.h" using base::DictionaryValue; using base::ListValue; diff --git a/chrome/unit_tests.isolate b/chrome/unit_tests.isolate index 8367622..7bf9a51 100644 --- a/chrome/unit_tests.isolate +++ b/chrome/unit_tests.isolate @@ -44,6 +44,7 @@ '../third_party/pyftpdlib/', '../third_party/pywebsocket/', '../third_party/tlslite/', + '../third_party/zlib/google/test/data/', '../tools/swarm_client/', '<(PRODUCT_DIR)/pyproto/', 'test/data/', diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc index 18e2dec..46a6c0e 100644 --- a/chrome/utility/chrome_content_utility_client.cc +++ b/chrome/utility/chrome_content_utility_client.cc @@ -34,11 +34,11 @@ #include "chrome/common/safe_browsing/zip_analyzer.h" #include "chrome/common/web_resource/web_resource_unpacker.h" #include "chrome/utility/profile_import_handler.h" -#include "components/zip/zip.h" #include "content/public/utility/utility_thread.h" #include "printing/backend/print_backend.h" #include "printing/page_range.h" #include "third_party/skia/include/core/SkBitmap.h" +#include "third_party/zlib/google/zip.h" #include "ui/base/ui_base_switches.h" #include "ui/gfx/codec/jpeg_codec.h" #include "ui/gfx/rect.h" diff --git a/components/components.gyp b/components/components.gyp index 3f1fc22e..b6ea5b5 100644 --- a/components/components.gyp +++ b/components/components.gyp @@ -19,6 +19,5 @@ 'visitedlink.gypi', 'webdata.gypi', 'web_contents_delegate_android.gypi', - 'zip.gypi', ], } diff --git a/components/components_tests.gypi b/components/components_tests.gypi index 9919247..ea2d9f4 100644 --- a/components/components_tests.gypi +++ b/components/components_tests.gypi @@ -17,8 +17,6 @@ 'visitedlink/test/visitedlink_unittest.cc', 'webdata/encryptor/encryptor_password_mac_unittest.cc', 'webdata/encryptor/encryptor_unittest.cc', - 'zip/zip_reader_unittest.cc', - 'zip/zip_unittest.cc', ], 'include_dirs': [ '..', @@ -48,9 +46,6 @@ 'visitedlink_browser', 'visitedlink_renderer', '../content/content_resources.gyp:content_resources', - - # Dependencies of zip - 'zip', ], 'conditions': [ ['OS == "android" and gtest_target_type == "shared_library"', { diff --git a/components/test/data/zip/create_test_zip.sh b/components/test/data/zip/create_test_zip.sh deleted file mode 100755 index e19d675..0000000 --- a/components/test/data/zip/create_test_zip.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2011 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -# -# Run this script in its directory to recreate test.zip -# and test_nocompress.zip. - -rm test.zip -rm test_nocompress.zip -pushd test -zip -r ../test.zip . -zip -r -0 ../test_nocompress.zip . -popd diff --git a/components/test/data/zip/evil.zip b/components/test/data/zip/evil.zip Binary files differdeleted file mode 100644 index 8fb908a..0000000 --- a/components/test/data/zip/evil.zip +++ /dev/null diff --git a/components/test/data/zip/evil_via_absolute_file_name.zip b/components/test/data/zip/evil_via_absolute_file_name.zip Binary files differdeleted file mode 100644 index 2415f81..0000000 --- a/components/test/data/zip/evil_via_absolute_file_name.zip +++ /dev/null diff --git a/components/test/data/zip/evil_via_invalid_utf8.zip b/components/test/data/zip/evil_via_invalid_utf8.zip Binary files differdeleted file mode 100644 index 94b633e..0000000 --- a/components/test/data/zip/evil_via_invalid_utf8.zip +++ /dev/null diff --git a/components/test/data/zip/test.zip b/components/test/data/zip/test.zip Binary files differdeleted file mode 100644 index 4bafe30..0000000 --- a/components/test/data/zip/test.zip +++ /dev/null diff --git a/components/test/data/zip/test/foo.txt b/components/test/data/zip/test/foo.txt deleted file mode 100644 index 257cc56..0000000 --- a/components/test/data/zip/test/foo.txt +++ /dev/null @@ -1 +0,0 @@ -foo diff --git a/components/test/data/zip/test/foo/bar.txt b/components/test/data/zip/test/foo/bar.txt deleted file mode 100644 index 5716ca5..0000000 --- a/components/test/data/zip/test/foo/bar.txt +++ /dev/null @@ -1 +0,0 @@ -bar diff --git a/components/test/data/zip/test/foo/bar/.hidden b/components/test/data/zip/test/foo/bar/.hidden deleted file mode 100644 index 136c05e..0000000 --- a/components/test/data/zip/test/foo/bar/.hidden +++ /dev/null @@ -1 +0,0 @@ -hidden diff --git a/components/test/data/zip/test/foo/bar/baz.txt b/components/test/data/zip/test/foo/bar/baz.txt deleted file mode 100644 index 7601807..0000000 --- a/components/test/data/zip/test/foo/bar/baz.txt +++ /dev/null @@ -1 +0,0 @@ -baz diff --git a/components/test/data/zip/test/foo/bar/quux.txt b/components/test/data/zip/test/foo/bar/quux.txt deleted file mode 100644 index 4797879..0000000 --- a/components/test/data/zip/test/foo/bar/quux.txt +++ /dev/null @@ -1,39 +0,0 @@ -Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sem urna, semper ac, adipiscing sed, varius eget, quam. Fusce ipsum dolor, condimentum et, ornare in, consequat ac, nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla feugiat justo ac enim. Ut vehicula dapibus elit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam lacus sem, viverra in, laoreet quis, cursus non, odio. Maecenas in elit. Pellentesque vitae dui. Ut dictum tellus et orci. Sed consectetur. Fusce tincidunt. Cras vulputate adipiscing metus. Aliquam lacinia. Vestibulum leo. Donec enim. Etiam imperdiet libero. Nam tellus ante, lobortis eget, dapibus vel, accumsan ultricies, nibh. In ultrices mauris at est. - -Phasellus ac elit sit amet felis aliquet venenatis. Sed porta libero at massa. Fusce blandit diam eget lorem. Nullam velit diam, fermentum eget, scelerisque non, faucibus a, tellus. Ut accumsan eros vitae velit. Proin vehicula aliquam felis. Proin ligula augue, gravida a, fermentum sit amet, sodales ac, purus. Phasellus sagittis scelerisque tellus. Ut gravida metus quis enim. Curabitur malesuada orci in massa. Pellentesque nibh turpis, adipiscing vel, rutrum quis, rhoncus vel, dolor. Pellentesque suscipit, arcu in egestas semper, lorem sapien vehicula nunc, non scelerisque lectus ante at diam. Etiam varius leo. Sed dictum, ante sed imperdiet ornare, felis leo lobortis eros, eu tincidunt lorem tellus sit amet mi. Mauris nisl elit, placerat non, scelerisque id, congue non, ligula. Nulla eget mi eu dolor scelerisque tempor. Fusce non lorem vel nibh mattis blandit. - -Vivamus sit amet urna quis eros varius condimentum. Phasellus placerat ligula ac felis. Vivamus tempor, metus id fermentum feugiat, justo ligula malesuada nisl, ut vulputate nisi arcu in eros. Vestibulum non erat in massa laoreet luctus. Praesent tempor, tortor eget sodales condimentum, purus odio gravida tellus, pellentesque euismod enim diam id augue. Duis malesuada lacus eu felis. Suspendisse tristique faucibus arcu. Etiam ac sapien. Aenean dolor enim, semper auctor, dapibus cursus, varius et, arcu. Aenean pede nunc, varius nec, pulvinar a, accumsan id, dui. Nulla a risus eget nibh pharetra rutrum. Quisque adipiscing adipiscing neque. Praesent faucibus lacus eu nulla. Vestibulum nec nunc vel quam cursus sollicitudin. Nam at quam at neque pharetra elementum. Sed ornare ullamcorper nibh. - -Aliquam aliquam vulputate diam. Ut molestie pharetra neque. Pellentesque sodales blandit nibh. Donec eget mauris eget mauris blandit pharetra. Etiam imperdiet commodo tellus. Nulla felis justo, vestibulum hendrerit, posuere vitae, viverra ut, risus. Pellentesque auctor, ante egestas suscipit vestibulum, sem dolor posuere urna, pellentesque dignissim ante orci a lectus. Suspendisse potenti. Sed et pede pretium arcu porttitor porta. Nullam nec nulla. Fusce lacinia, massa ac fermentum congue, dui quam varius mauris, vitae ullamcorper pede lacus at nisl. Suspendisse aliquam pede a sapien. Morbi pellentesque, mi id mattis aliquet, nisl erat tincidunt lorem, eu bibendum nunc nisi nec erat. Suspendisse commodo dapibus dolor. Quisque id risus. Nullam gravida est tempor lectus. - -Morbi mattis. Cras sagittis. Sed eleifend odio sit amet nibh. Cras sit amet massa. Donec congue nulla vel augue. Maecenas fermentum turpis at diam. In lobortis. Phasellus aliquet. Etiam eu diam. Integer accumsan. Integer sagittis tempor mi. Aliquam interdum lectus id augue. Donec vel eros. Donec vitae orci a sapien imperdiet consectetur. - -Maecenas est lorem, luctus vel, fringilla sed, rutrum nec, nisl. Donec sapien. Vestibulum at metus. Praesent erat. Nulla semper metus a lacus. Morbi ultrices. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vivamus odio. Ut mauris. Fusce et risus. Proin at mauris a eros imperdiet mollis. Sed adipiscing hendrerit nisl. Curabitur libero. Donec nulla. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. - -Nullam non lacus. Vivamus rhoncus dolor sit amet ipsum. Vivamus volutpat eleifend odio. Vestibulum nunc. In at magna a pede gravida vulputate. Praesent ligula tellus, rhoncus elementum, pulvinar a, condimentum vitae, libero. Donec ornare dui. Proin non lorem quis massa placerat interdum. Nam justo. Aliquam rutrum dignissim mi. Mauris tellus. Proin dui felis, lacinia quis, volutpat a, blandit sed, neque. Etiam non dolor eu justo interdum tristique. Morbi volutpat, elit vitae rutrum iaculis, augue mi accumsan metus, sed porttitor felis mi sed felis. - -Nulla quam lectus, pharetra non, sodales sit amet, pretium quis, massa. Aliquam orci. Duis id massa. Pellentesque porttitor nibh id quam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec convallis, pede vitae volutpat consequat, justo lorem ultricies nisi, ut scelerisque leo lorem in tellus. Cras bibendum. Sed hendrerit placerat tortor. Sed felis. Aliquam erat volutpat. Praesent rhoncus nisi. Vestibulum justo felis, tincidunt luctus, suscipit sed, tincidunt ut, lorem. Proin non risus ac mi mattis volutpat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam pellentesque nisl sit amet sapien rutrum porta. - -Phasellus ut pede non odio ultricies egestas. Aenean nibh. Mauris magna felis, posuere non, tempus et, bibendum ut, felis. Donec vel ipsum ac nisi dapibus lobortis. Sed congue ligula at est. Vivamus elit est, rhoncus vitae, tempus at, consectetur nec, elit. Duis vehicula tellus vitae sem. Suspendisse rhoncus felis sit amet magna. Maecenas vulputate risus in diam. Nunc sollicitudin risus eget quam. Nam pretium purus eleifend dolor. Integer erat nulla, mattis eu, sollicitudin sed, sagittis nec, metus. - -Donec ante felis, ultrices nec, pellentesque nec, elementum et, nunc. Pellentesque in tortor sit amet urna aliquet tincidunt. Praesent ultrices. Sed tincidunt. Donec turpis enim, feugiat eu, cursus ut, viverra ut, odio. Morbi in orci quis enim vehicula lobortis. Proin in neque. Pellentesque venenatis neque sit amet augue. Proin suscipit nibh. Praesent et diam. - -In eget ligula quis libero vulputate eleifend. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc non urna vitae mi vulputate adipiscing. Nulla vitae arcu. Nullam ut nisl ac enim pulvinar auctor. Suspendisse tortor pede, consectetur in, volutpat at, condimentum vel, ligula. Pellentesque nisi est, vulputate vitae, hendrerit id, venenatis sit amet, urna. Nunc lobortis. Sed rhoncus, tortor vitae pellentesque facilisis, massa ante interdum massa, feugiat faucibus pede nunc et tellus. Quisque auctor sollicitudin nibh. Aliquam congue. Praesent ullamcorper mi id lacus. Nullam ac risus et velit ullamcorper vehicula. Vestibulum consectetur convallis neque. Donec dapibus, ante a rutrum interdum, mi dui auctor lacus, quis posuere eros diam eu nisl. Integer nec velit vel purus eleifend condimentum. Cras quis nunc. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. - -Sed euismod, metus eu consectetur dictum, felis eros sodales pede, ac pellentesque lacus orci sed velit. Praesent a justo. Aliquam massa dolor, condimentum non, dapibus quis, vestibulum a, purus. Duis gravida porta dolor. Nullam sit amet mi sagittis massa pretium ultricies. Ut fringilla. Aliquam venenatis feugiat dui. Pellentesque tempor, leo et ullamcorper placerat, felis libero blandit nisl, sit amet pharetra nisl erat sit amet dolor. In sem erat, porta rhoncus, auctor ac, convallis feugiat, dui. Sed tempus metus at erat. Cras gravida. Cras urna nisi, fermentum non, sodales sed, adipiscing sed, nulla. - -Donec pellentesque, velit sit amet ultricies dictum, sem quam posuere arcu, tristique mollis nibh dui ac libero. Vestibulum consectetur velit sed dolor. Nullam ornare sodales nisi. Sed facilisis sollicitudin arcu. Proin vitae lectus vel nulla auctor faucibus. Aenean nec nisl sit amet risus faucibus tincidunt. Ut sed nisl. Vivamus vehicula ligula a nunc. Curabitur mauris. Integer est felis, fermentum aliquam, dignissim id, gravida id, purus. Nullam porta felis eget ante. Phasellus lacinia, odio et elementum viverra, dui neque tempus massa, ac adipiscing lectus velit vitae turpis. Integer scelerisque neque in tortor. Duis et elit. Mauris elementum urna sed risus. Nunc aliquet, ipsum ac venenatis elementum, sapien orci vulputate lacus, eu lobortis sapien lorem non enim. Donec enim sapien, gravida vitae, vestibulum et, mattis dapibus, sem. Phasellus mi. - -Cras a lorem nec diam aliquet viverra. Aliquam sed leo sit amet neque porta venenatis. Nulla facilisi. Duis lectus felis, fermentum quis, sagittis a, vestibulum consectetur, orci. Suspendisse sodales odio vitae lectus. Curabitur nunc. Phasellus cursus diam sit amet ipsum. Aenean cursus tellus eget nunc. Vivamus mattis urna a lorem. Mauris vitae mi. Morbi luctus molestie pede. Vestibulum lobortis lacus sed lacus. Aliquam nisl libero, pellentesque sed, facilisis ut, varius vehicula, lacus. Mauris orci. Pellentesque sed risus id quam sodales lobortis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed facilisis, odio vitae laoreet auctor, nulla dui sagittis lectus, sit amet viverra orci arcu et lectus. Pellentesque ut sem. Maecenas a est. - -Suspendisse tincidunt. Sed bibendum molestie ligula. Suspendisse massa mauris, cursus a, luctus eget, posuere sed, nulla. Fusce vitae urna. Duis fermentum. Donec a neque ac pede lobortis mollis. Donec massa ligula, facilisis et, dapibus sed, ultrices non, sem. Phasellus diam. Maecenas velit arcu, viverra ut, gravida ac, tincidunt eget, nunc. Sed sit amet enim non dui tristique lacinia. Vivamus eu orci. Duis metus. Nulla facilisi. Phasellus at lectus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vivamus mauris. Duis dictum, erat eu scelerisque sollicitudin, mi augue tincidunt lorem, vel lacinia lectus nibh quis dui. Ut ornare dignissim elit. Phasellus posuere ligula vel justo. - -Sed neque. Quisque porttitor lorem vel arcu. Praesent a mi et risus suscipit egestas. Proin est lectus, rhoncus sit amet, aliquet non, fermentum ut, nulla. Aenean erat nisl, rutrum dictum, placerat vel, malesuada ac, arcu. Suspendisse posuere, ante sed consequat gravida, velit mi dignissim sem, et pretium dui diam in elit. Sed dictum nulla. Duis tristique tincidunt eros. Morbi velit. Donec a lorem. Aliquam cursus. Vivamus dapibus varius neque. Quisque eget diam. Nulla facilisi. Pellentesque eu sapien. Curabitur egestas cursus risus. Proin odio tortor, interdum eget, fringilla venenatis, luctus et, turpis. Phasellus nulla lorem, ullamcorper ut, elementum rhoncus, ultrices sed, ipsum. Nam volutpat. - -Quisque eu purus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur non nulla. Donec dignissim porta lorem. Mauris ornare venenatis odio. Aenean eu lectus at eros porta molestie. Vivamus neque. Morbi aliquam. Nulla tincidunt enim id ligula. Nunc gravida felis consectetur dolor. Phasellus tempus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla nec libero quis ipsum auctor vehicula. Maecenas consectetur tempor turpis. Integer commodo. In hac habitasse platea dictumst. Donec nec justo quis sem placerat gravida. Donec sollicitudin, turpis sit amet bibendum elementum, nisl ligula venenatis ipsum, vel sollicitudin justo arcu eu leo. Phasellus aliquet faucibus libero. - -Nam molestie nulla eu risus. Fusce id erat. Maecenas volutpat nunc eu ligula. Sed tortor est, imperdiet quis, viverra et, ornare in, ipsum. Praesent aliquet. Nulla suscipit. In posuere enim in odio. Nullam ante ipsum, imperdiet id, convallis id, hendrerit id, libero. Donec convallis libero ut felis. Curabitur venenatis placerat justo. Vestibulum mauris arcu, scelerisque et, dapibus vel, scelerisque a, lectus. Sed sit amet orci id felis tristique tincidunt. Curabitur adipiscing, nulla vel pretium tristique, tellus ipsum lacinia eros, vitae venenatis pede lectus sit amet neque. Nulla feugiat. Aenean euismod, nunc vel rutrum mattis, lorem purus venenatis sapien, sed facilisis pede enim at elit. Vivamus viverra. Cras vitae purus ac felis fringilla condimentum. Nullam ac nisi vitae massa faucibus aliquet. - -Etiam ut nibh nec neque elementum iaculis. Maecenas facilisis nulla at lorem. Pellentesque elit sapien, ultricies at, dignissim nec, cursus eu, pede. Morbi gravida, ipsum eget malesuada eleifend, est arcu pulvinar nisl, et fermentum urna felis sed tellus. Mauris fermentum sollicitudin neque. Nunc at odio. Pellentesque et turpis. Cras congue congue nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam feugiat dapibus tellus. Aenean aliquam, mi id interdum feugiat, nunc lorem laoreet massa, ac semper urna sem vel purus. Quisque bibendum tellus ut est. - -Morbi aliquam lectus sit amet nisi. Praesent urna purus, porttitor vitae, accumsan in, sollicitudin at, lorem. Donec diam dui, hendrerit eget, tincidunt ut, ultrices vehicula, dolor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam erat volutpat. Pellentesque iaculis iaculis lacus. Fusce auctor. Morbi vulputate purus at felis. Maecenas a pede nec metus vulputate ullamcorper. Cras non lectus. Suspendisse lacinia. diff --git a/components/test/data/zip/test_nocompress.zip b/components/test/data/zip/test_nocompress.zip Binary files differdeleted file mode 100644 index 25d66c2..0000000 --- a/components/test/data/zip/test_nocompress.zip +++ /dev/null diff --git a/components/zip.gypi b/components/zip.gypi deleted file mode 100644 index e983b59..0000000 --- a/components/zip.gypi +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'zip', - 'type': 'static_library', - 'dependencies': [ - '../third_party/zlib/zlib.gyp:minizip', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'zip/zip.cc', - 'zip/zip.h', - 'zip/zip_internal.cc', - 'zip/zip_internal.h', - 'zip/zip_reader.cc', - 'zip/zip_reader.h', - ], - }, - ], -} diff --git a/components/zip/DEPS b/components/zip/DEPS deleted file mode 100644 index 200eaf8..0000000 --- a/components/zip/DEPS +++ /dev/null @@ -1,7 +0,0 @@ -include_rules = [ - # No need for a content dependency - and it's better to enforce it. - "-content", - - "+net/base", - "+third_party/zlib/contrib/minizip", -] diff --git a/third_party/zlib/google/DEPS b/third_party/zlib/google/DEPS new file mode 100644 index 0000000..6a2f02e --- /dev/null +++ b/third_party/zlib/google/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+net/base", +] diff --git a/components/zip/OWNERS b/third_party/zlib/google/OWNERS index ff93254..ff93254 100644 --- a/components/zip/OWNERS +++ b/third_party/zlib/google/OWNERS diff --git a/components/zip/zip.cc b/third_party/zlib/google/zip.cc index 7521641..e24449b 100644 --- a/components/zip/zip.cc +++ b/third_party/zlib/google/zip.cc @@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/zip/zip.h" +#include "third_party/zlib/google/zip.h" #include "base/bind.h" #include "base/file_util.h" #include "base/logging.h" #include "base/string16.h" #include "base/string_util.h" -#include "components/zip/zip_internal.h" -#include "components/zip/zip_reader.h" #include "net/base/file_stream.h" +#include "third_party/zlib/google/zip_internal.h" +#include "third_party/zlib/google/zip_reader.h" #if defined(USE_SYSTEM_MINIZIP) #include <minizip/unzip.h> diff --git a/components/zip/zip.h b/third_party/zlib/google/zip.h index a997c9c..9809fce 100644 --- a/components/zip/zip.h +++ b/third_party/zlib/google/zip.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_ZIP_ZIP_H_ -#define COMPONENTS_ZIP_ZIP_H_ +#ifndef THIRD_PARTY_ZLIB_GOOGLE_ZIP_H_ +#define THIRD_PARTY_ZLIB_GOOGLE_ZIP_H_ #include "base/callback.h" #include "base/files/file_path.h" @@ -41,4 +41,4 @@ bool Unzip(const base::FilePath& zip_file, const base::FilePath& dest_dir); } // namespace zip -#endif // COMPONENTS_ZIP_ZIP_H_ +#endif // THIRD_PARTY_ZLIB_GOOGLE_ZIP_H_ diff --git a/components/zip/zip_internal.cc b/third_party/zlib/google/zip_internal.cc index 56bca5e9..3a3a51a 100644 --- a/components/zip/zip_internal.cc +++ b/third_party/zlib/google/zip_internal.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/zip/zip.h" +#include "third_party/zlib/google/zip.h" #include <algorithm> diff --git a/components/zip/zip_internal.h b/third_party/zlib/google/zip_internal.h index 4f1ea4f..57894be 100644 --- a/components/zip/zip_internal.h +++ b/third_party/zlib/google/zip_internal.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_ZIP_ZIP_INTERNAL_H_ -#define COMPONENTS_ZIP_ZIP_INTERNAL_H_ +#ifndef THIRD_PARTY_ZLIB_GOOGLE_ZIP_INTERNAL_H_ +#define THIRD_PARTY_ZLIB_GOOGLE_ZIP_INTERNAL_H_ #if defined(OS_WIN) #include <windows.h> @@ -59,4 +59,4 @@ const int kZipBufSize = 8192; } // namespace internal } // namespace zip -#endif // COMPONENTS_ZIP_ZIP_INTERNAL_H_ +#endif // THIRD_PARTY_ZLIB_GOOGLE_ZIP_INTERNAL_H_ diff --git a/components/zip/zip_reader.cc b/third_party/zlib/google/zip_reader.cc index 9cb3695..5433b04 100644 --- a/components/zip/zip_reader.cc +++ b/third_party/zlib/google/zip_reader.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/zip/zip_reader.h" +#include "third_party/zlib/google/zip_reader.h" #include "base/file_util.h" #include "base/logging.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "components/zip/zip_internal.h" #include "net/base/file_stream.h" +#include "third_party/zlib/google/zip_internal.h" #if defined(USE_SYSTEM_MINIZIP) #include <minizip/unzip.h> diff --git a/components/zip/zip_reader.h b/third_party/zlib/google/zip_reader.h index 0bb171c..4064da4 100644 --- a/components/zip/zip_reader.h +++ b/third_party/zlib/google/zip_reader.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_ZIP_ZIP_READER_H_ -#define COMPONENTS_ZIP_ZIP_READER_H_ +#ifndef THIRD_PARTY_ZLIB_GOOGLE_ZIP_READER_H_ +#define THIRD_PARTY_ZLIB_GOOGLE_ZIP_READER_H_ #include <string> @@ -174,4 +174,4 @@ class ZipReader { } // namespace zip -#endif // COMPONENTS_ZIP_ZIP_READER_H_ +#endif // THIRD_PARTY_ZLIB_GOOGLE_ZIP_READER_H_ diff --git a/components/zip/zip_reader_unittest.cc b/third_party/zlib/google/zip_reader_unittest.cc index 0b4b554..a12b04e 100644 --- a/components/zip/zip_reader_unittest.cc +++ b/third_party/zlib/google/zip_reader_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/zip/zip_reader.h" +#include "third_party/zlib/google/zip_reader.h" #include <set> #include <string> @@ -15,9 +15,9 @@ #include "base/platform_file.h" #include "base/time.h" #include "base/utf_string_conversions.h" -#include "components/zip/zip_internal.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" +#include "third_party/zlib/google/zip_internal.h" namespace { @@ -75,7 +75,6 @@ class ZipReaderTest : public PlatformTest { test_dir_ = temp_dir_.path(); ASSERT_TRUE(GetTestDataDirectory(&test_data_dir_)); - test_data_dir_ = test_data_dir_.AppendASCII("zip"); test_zip_file_ = test_data_dir_.AppendASCII("test.zip"); evil_zip_file_ = test_data_dir_.AppendASCII("evil.zip"); @@ -106,7 +105,9 @@ class ZipReaderTest : public PlatformTest { EXPECT_TRUE(success); if (!success) return false; - *path = path->AppendASCII("components"); + *path = path->AppendASCII("third_party"); + *path = path->AppendASCII("zlib"); + *path = path->AppendASCII("google"); *path = path->AppendASCII("test"); *path = path->AppendASCII("data"); return true; diff --git a/components/zip/zip_unittest.cc b/third_party/zlib/google/zip_unittest.cc index b314e8c..3f7911e 100644 --- a/components/zip/zip_unittest.cc +++ b/third_party/zlib/google/zip_unittest.cc @@ -10,10 +10,10 @@ #include "base/files/scoped_temp_dir.h" #include "base/path_service.h" #include "base/string_util.h" -#include "components/zip/zip.h" -#include "components/zip/zip_reader.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" +#include "third_party/zlib/google/zip.h" +#include "third_party/zlib/google/zip_reader.h" namespace { @@ -54,7 +54,9 @@ class ZipTest : public PlatformTest { EXPECT_TRUE(success); if (!success) return false; - *path = path->AppendASCII("components"); + *path = path->AppendASCII("third_party"); + *path = path->AppendASCII("zlib"); + *path = path->AppendASCII("google"); *path = path->AppendASCII("test"); *path = path->AppendASCII("data"); return true; @@ -64,7 +66,6 @@ class ZipTest : public PlatformTest { bool expect_hidden_files) { base::FilePath test_dir; ASSERT_TRUE(GetTestDataDirectory(&test_dir)); - test_dir = test_dir.AppendASCII("zip"); TestUnzipFile(test_dir.Append(filename), expect_hidden_files); } @@ -120,7 +121,7 @@ TEST_F(ZipTest, UnzipUncompressed) { TEST_F(ZipTest, UnzipEvil) { base::FilePath path; ASSERT_TRUE(GetTestDataDirectory(&path)); - path = path.AppendASCII("zip").AppendASCII("evil.zip"); + path = path.AppendASCII("evil.zip"); // Unzip the zip file into a sub directory of test_dir_ so evil.zip // won't create a persistent file outside test_dir_ in case of a // failure. @@ -137,7 +138,7 @@ TEST_F(ZipTest, UnzipEvil2) { ASSERT_TRUE(GetTestDataDirectory(&path)); // The zip file contains an evil file with invalid UTF-8 in its file // name. - path = path.AppendASCII("zip").AppendASCII("evil_via_invalid_utf8.zip"); + path = path.AppendASCII("evil_via_invalid_utf8.zip"); // See the comment at UnzipEvil() for why we do this. base::FilePath output_dir = test_dir_.AppendASCII("out"); // This should fail as it contains an evil file. @@ -150,7 +151,7 @@ TEST_F(ZipTest, UnzipEvil2) { TEST_F(ZipTest, Zip) { base::FilePath src_dir; ASSERT_TRUE(GetTestDataDirectory(&src_dir)); - src_dir = src_dir.AppendASCII("zip").AppendASCII("test"); + src_dir = src_dir.AppendASCII("test"); base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); @@ -163,7 +164,7 @@ TEST_F(ZipTest, Zip) { TEST_F(ZipTest, ZipIgnoreHidden) { base::FilePath src_dir; ASSERT_TRUE(GetTestDataDirectory(&src_dir)); - src_dir = src_dir.AppendASCII("zip").AppendASCII("test"); + src_dir = src_dir.AppendASCII("test"); base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); @@ -177,7 +178,7 @@ TEST_F(ZipTest, ZipIgnoreHidden) { TEST_F(ZipTest, ZipFiles) { base::FilePath src_dir; ASSERT_TRUE(GetTestDataDirectory(&src_dir)); - src_dir = src_dir.AppendASCII("zip").AppendASCII("test"); + src_dir = src_dir.AppendASCII("test"); base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); diff --git a/third_party/zlib/zlib.gyp b/third_party/zlib/zlib.gyp index 069fb63..ebdad42 100644 --- a/third_party/zlib/zlib.gyp +++ b/third_party/zlib/zlib.gyp @@ -106,6 +106,25 @@ ], }], ], - } + }, + { + 'target_name': 'zip', + 'type': 'static_library', + 'dependencies': [ + 'minizip', + '../../base/base.gyp:base', + ], + 'include_dirs': [ + '../..', + ], + 'sources': [ + 'google/zip.cc', + 'google/zip.h', + 'google/zip_internal.cc', + 'google/zip_internal.h', + 'google/zip_reader.cc', + 'google/zip_reader.h', + ], + }, ], } |