Commit 4a126339 authored by Anand K. Mistry's avatar Anand K. Mistry Committed by Commit Bot

Clean up includes in zip_archiver.

This fixes up includes to follow Chromium style, and follow IWYU.

BUG=None

Change-Id: I18c6170bc7746a57d7edcb796961056717ce8966
Reviewed-on: https://chromium-review.googlesource.com/1237800Reviewed-by: default avatarTatsuhisa Yamaguchi <yamaguchi@chromium.org>
Commit-Queue: Anand Mistry <amistry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593090}
parent 24cb659d
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "char_coding.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/char_coding.h"
#include <string.h> #include <string.h>
#include <string> #include <string>
......
...@@ -2,15 +2,19 @@ ...@@ -2,15 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "compressor.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/compressor.h"
#include <cstring> #include <cstring>
#include <ctime> #include <ctime>
#include <sstream> #include <sstream>
#include <string>
#include "compressor_archive_minizip.h"
#include "compressor_io_javascript_stream.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/compressor_archive_minizip.h"
#include "request.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/compressor_io_javascript_stream.h"
#include "chrome/browser/resources/chromeos/zip_archiver/cpp/javascript_compressor_requestor_interface.h"
#include "chrome/browser/resources/chromeos/zip_archiver/cpp/javascript_message_sender_interface.h"
#include "chrome/browser/resources/chromeos/zip_archiver/cpp/javascript_requestor_interface.h"
#include "chrome/browser/resources/chromeos/zip_archiver/cpp/request.h"
namespace { namespace {
......
...@@ -5,19 +5,19 @@ ...@@ -5,19 +5,19 @@
#ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_COMPRESSOR_H_ #ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_COMPRESSOR_H_
#define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_COMPRESSOR_H_ #define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_COMPRESSOR_H_
#include <pthread.h>
#include <ctime> #include <ctime>
#include "compressor_archive.h"
#include "compressor_stream.h"
#include "javascript_compressor_requestor_interface.h"
#include "javascript_message_sender_interface.h"
#include "ppapi/cpp/instance_handle.h" #include "ppapi/cpp/instance_handle.h"
#include "ppapi/cpp/var_array_buffer.h" #include "ppapi/cpp/var_array_buffer.h"
#include "ppapi/cpp/var_dictionary.h" #include "ppapi/cpp/var_dictionary.h"
#include "ppapi/utility/completion_callback_factory.h" #include "ppapi/utility/completion_callback_factory.h"
#include "ppapi/utility/threading/simple_thread.h" #include "ppapi/utility/threading/simple_thread.h"
class CompressorArchive;
class CompressorStream;
class JavaScriptCompressorRequestorInterface;
class JavaScriptMessageSenderInterface;
// Handles all packing operations like creating archive objects and writing data // Handles all packing operations like creating archive objects and writing data
// onto the archive. // onto the archive.
class Compressor { class Compressor {
......
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
#ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_COMPRESSOR_ARCHIVE_H_ #ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_COMPRESSOR_ARCHIVE_H_
#define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_COMPRESSOR_ARCHIVE_H_ #define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_COMPRESSOR_ARCHIVE_H_
#include "compressor_io_javascript_stream.h" #include <cstdint>
#include <string>
class CompressorStream;
// Defines a wrapper for packing operations executed on an archive. API is not // Defines a wrapper for packing operations executed on an archive. API is not
// meant to be thread safe and its methods shouldn't be called in parallel. // meant to be thread safe and its methods shouldn't be called in parallel.
......
...@@ -2,12 +2,15 @@ ...@@ -2,12 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "compressor_archive_minizip.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/compressor_archive_minizip.h"
#include <algorithm>
#include <cerrno> #include <cerrno>
#include <cstring> #include <cstring>
#include "base/time/time.h" #include "base/time/time.h"
#include "chrome/browser/resources/chromeos/zip_archiver/cpp/compressor_io_javascript_stream.h"
#include "chrome/browser/resources/chromeos/zip_archiver/cpp/compressor_stream.h"
#include "ppapi/cpp/logging.h" #include "ppapi/cpp/logging.h"
namespace { namespace {
......
...@@ -7,11 +7,12 @@ ...@@ -7,11 +7,12 @@
#include <string> #include <string>
#include "compressor_archive.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/compressor_archive.h"
#include "compressor_stream.h"
#include "third_party/minizip/src/unzip.h" #include "third_party/minizip/src/unzip.h"
#include "third_party/minizip/src/zip.h" #include "third_party/minizip/src/zip.h"
class CompressorStream;
// A namespace with constants used by CompressorArchiveMinizip. // A namespace with constants used by CompressorArchiveMinizip.
namespace compressor_archive_constants { namespace compressor_archive_constants {
......
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "compressor_io_javascript_stream.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/compressor_io_javascript_stream.h"
#include <algorithm>
#include <cstring>
#include <limits> #include <limits>
#include <thread>
#include "chrome/browser/resources/chromeos/zip_archiver/cpp/javascript_compressor_requestor_interface.h"
#include "ppapi/cpp/logging.h" #include "ppapi/cpp/logging.h"
CompressorIOJavaScriptStream::CompressorIOJavaScriptStream( CompressorIOJavaScriptStream::CompressorIOJavaScriptStream(
......
...@@ -6,16 +6,18 @@ ...@@ -6,16 +6,18 @@
#define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_COMPRESSOR_IO_JAVASCRIPT_STREAM_H_ #define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_COMPRESSOR_IO_JAVASCRIPT_STREAM_H_
#include <pthread.h> #include <pthread.h>
#include <cstdint>
#include <string> #include <string>
#include "compressor_stream.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/compressor_stream.h"
#include "javascript_compressor_requestor_interface.h"
#include "ppapi/cpp/instance_handle.h" #include "ppapi/cpp/instance_handle.h"
#include "ppapi/cpp/var_array_buffer.h" #include "ppapi/cpp/var_array_buffer.h"
#include "ppapi/utility/completion_callback_factory.h" #include "ppapi/utility/completion_callback_factory.h"
#include "ppapi/utility/threading/lock.h" #include "ppapi/utility/threading/lock.h"
#include "ppapi/utility/threading/simple_thread.h" #include "ppapi/utility/threading/simple_thread.h"
class JavaScriptCompressorRequestorInterface;
// A namespace with constants used by CompressorArchiveMinizip. // A namespace with constants used by CompressorArchiveMinizip.
namespace compressor_stream_constants { namespace compressor_stream_constants {
// We need at least 256KB for MiniZip. // We need at least 256KB for MiniZip.
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_COMPRESSOR_STREAM_H_ #ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_COMPRESSOR_STREAM_H_
#define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_COMPRESSOR_STREAM_H_ #define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_COMPRESSOR_STREAM_H_
#include <cstdint>
#include <string> #include <string>
#include "ppapi/cpp/var_array_buffer.h" #include "ppapi/cpp/var_array_buffer.h"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_JAVASCRIPT_COMPRESSOR_REQUESTOR_INTERFACE_H_ #ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_JAVASCRIPT_COMPRESSOR_REQUESTOR_INTERFACE_H_
#define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_JAVASCRIPT_COMPRESSOR_REQUESTOR_INTERFACE_H_ #define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_JAVASCRIPT_COMPRESSOR_REQUESTOR_INTERFACE_H_
#include <string> #include <cstdint>
#include "ppapi/cpp/var_array_buffer.h" #include "ppapi/cpp/var_array_buffer.h"
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_JAVASCRIPT_MESSAGE_SENDER_INTERFACE_H_ #ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_JAVASCRIPT_MESSAGE_SENDER_INTERFACE_H_
#define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_JAVASCRIPT_MESSAGE_SENDER_INTERFACE_H_ #define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_JAVASCRIPT_MESSAGE_SENDER_INTERFACE_H_
#include <cstdint>
#include <string> #include <string>
#include "ppapi/cpp/var_array_buffer.h" #include "ppapi/cpp/var_array_buffer.h"
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_JAVASCRIPT_REQUESTOR_INTERFACE_H_ #ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_JAVASCRIPT_REQUESTOR_INTERFACE_H_
#define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_JAVASCRIPT_REQUESTOR_INTERFACE_H_ #define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_JAVASCRIPT_REQUESTOR_INTERFACE_H_
#include <cstdint>
#include <string> #include <string>
// Makes requests to JavaScript. Requests are asynchronous and responses must be // Makes requests to JavaScript. Requests are asynchronous and responses must be
......
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
#include <clocale> #include <clocale>
#include <sstream> #include <sstream>
#include "compressor.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/compressor.h"
#include "chrome/browser/resources/chromeos/zip_archiver/cpp/javascript_message_sender_interface.h"
#include "chrome/browser/resources/chromeos/zip_archiver/cpp/request.h"
#include "chrome/browser/resources/chromeos/zip_archiver/cpp/volume.h"
#include "ppapi/cpp/instance.h" #include "ppapi/cpp/instance.h"
#include "ppapi/cpp/instance_handle.h" #include "ppapi/cpp/instance_handle.h"
#include "ppapi/cpp/logging.h" #include "ppapi/cpp/logging.h"
...@@ -13,8 +16,6 @@ ...@@ -13,8 +16,6 @@
#include "ppapi/cpp/var_dictionary.h" #include "ppapi/cpp/var_dictionary.h"
#include "ppapi/utility/threading/lock.h" #include "ppapi/utility/threading/lock.h"
#include "ppapi/utility/threading/simple_thread.h" #include "ppapi/utility/threading/simple_thread.h"
#include "request.h"
#include "volume.h"
namespace { namespace {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "request.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/request.h"
#include <sstream> #include <sstream>
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
#ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_REQUEST_H_ #ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_REQUEST_H_
#define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_REQUEST_H_ #define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_REQUEST_H_
#include <cstdint>
#include <string>
#include "ppapi/cpp/var_array_buffer.h" #include "ppapi/cpp/var_array_buffer.h"
#include "ppapi/cpp/var_dictionary.h" #include "ppapi/cpp/var_dictionary.h"
......
...@@ -2,15 +2,17 @@ ...@@ -2,15 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "volume.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/volume.h"
#include <cstring> #include <cstring>
#include <sstream> #include <sstream>
#include "char_coding.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/char_coding.h"
#include "request.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/javascript_message_sender_interface.h"
#include "volume_archive_minizip.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/javascript_requestor_interface.h"
#include "volume_reader_javascript_stream.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/request.h"
#include "chrome/browser/resources/chromeos/zip_archiver/cpp/volume_archive_minizip.h"
#include "chrome/browser/resources/chromeos/zip_archiver/cpp/volume_reader_javascript_stream.h"
namespace { namespace {
......
...@@ -5,17 +5,19 @@ ...@@ -5,17 +5,19 @@
#ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_H_ #ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_H_
#define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_H_ #define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_H_
#include <pthread.h> #include <map>
#include <string>
#include "javascript_message_sender_interface.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/volume_archive.h"
#include "javascript_requestor_interface.h"
#include "ppapi/cpp/instance_handle.h" #include "ppapi/cpp/instance_handle.h"
#include "ppapi/cpp/var_array_buffer.h" #include "ppapi/cpp/var_array_buffer.h"
#include "ppapi/cpp/var_dictionary.h" #include "ppapi/cpp/var_dictionary.h"
#include "ppapi/utility/completion_callback_factory.h" #include "ppapi/utility/completion_callback_factory.h"
#include "ppapi/utility/threading/lock.h" #include "ppapi/utility/threading/lock.h"
#include "ppapi/utility/threading/simple_thread.h" #include "ppapi/utility/threading/simple_thread.h"
#include "volume_archive.h"
class JavaScriptMessageSenderInterface;
class JavaScriptRequestorInterface;
// A factory that creates VolumeArchive(s). Useful for testing. // A factory that creates VolumeArchive(s). Useful for testing.
class VolumeArchiveFactoryInterface { class VolumeArchiveFactoryInterface {
......
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
#ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_ARCHIVE_H_ #ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_ARCHIVE_H_
#define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_ARCHIVE_H_ #define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_ARCHIVE_H_
#include <time.h>
#include <cstdint>
#include <string> #include <string>
#include "volume_reader.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/volume_reader.h"
// Defines a wrapper for operations executed on an archive. API is not meant // Defines a wrapper for operations executed on an archive. API is not meant
// to be thread safe and its methods shouldn't be called in parallel. // to be thread safe and its methods shouldn't be called in parallel.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "volume_archive_minizip.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/volume_archive_minizip.h"
#include <time.h> #include <time.h>
#include <algorithm> #include <algorithm>
......
...@@ -5,12 +5,14 @@ ...@@ -5,12 +5,14 @@
#ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_ARCHIVE_MINIZIP_H_ #ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_ARCHIVE_MINIZIP_H_
#define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_ARCHIVE_MINIZIP_H_ #define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_ARCHIVE_MINIZIP_H_
#include <cstdint>
#include <memory>
#include <string> #include <string>
#include "third_party/minizip/src/unzip.h" #include "third_party/minizip/src/unzip.h"
#include "third_party/minizip/src/zip.h" #include "third_party/minizip/src/zip.h"
#include "volume_archive.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/volume_archive.h"
// A namespace with constants used by VolumeArchiveMinizip. // A namespace with constants used by VolumeArchiveMinizip.
namespace volume_archive_constants { namespace volume_archive_constants {
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_READER_H_ #ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_READER_H_
#define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_READER_H_ #define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_READER_H_
#include <cstdint>
#include <memory>
#include <string> #include <string>
// Defines a reader for archive volumes. This class is used by minizip // Defines a reader for archive volumes. This class is used by minizip
......
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "volume_reader_javascript_stream.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/volume_reader_javascript_stream.h"
#include <algorithm> #include <algorithm>
#include <limits> #include <limits>
#include "chrome/browser/resources/chromeos/zip_archiver/cpp/javascript_requestor_interface.h"
#include "ppapi/cpp/logging.h" #include "ppapi/cpp/logging.h"
#include "third_party/minizip/src/unzip.h" #include "third_party/minizip/src/unzip.h"
......
...@@ -6,10 +6,14 @@ ...@@ -6,10 +6,14 @@
#define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_READER_JAVASCRIPT_STREAM_H_ #define CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_CPP_VOLUME_READER_JAVASCRIPT_STREAM_H_
#include <pthread.h> #include <pthread.h>
#include <cstdint>
#include <memory>
#include <string>
#include "javascript_requestor_interface.h" #include "chrome/browser/resources/chromeos/zip_archiver/cpp/volume_reader.h"
#include "ppapi/cpp/var_array_buffer.h" #include "ppapi/cpp/var_array_buffer.h"
#include "volume_reader.h"
class JavaScriptRequestorInterface;
// A VolumeReader that reads the content of the volume's archive from // A VolumeReader that reads the content of the volume's archive from
// JavaScript. All methods including the constructor and destructor should be // JavaScript. All methods including the constructor and destructor should be
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment