1 // Copyright 2018 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CHROME_CHROME_CLEANER_ZIP_ARCHIVER_TARGET_ZIP_ARCHIVER_IMPL_H_
6 #define CHROME_CHROME_CLEANER_ZIP_ARCHIVER_TARGET_ZIP_ARCHIVER_IMPL_H_
7 
8 #include <string>
9 
10 #include "chrome/chrome_cleaner/mojom/zip_archiver.mojom.h"
11 #include "mojo/public/cpp/bindings/pending_receiver.h"
12 #include "mojo/public/cpp/bindings/receiver.h"
13 
14 namespace chrome_cleaner {
15 
16 class ZipArchiverImpl : public mojom::ZipArchiver {
17  public:
18   ZipArchiverImpl(mojo::PendingReceiver<mojom::ZipArchiver> receiver,
19                   base::OnceClosure connection_error_handler);
20   ~ZipArchiverImpl() override;
21 
22   void Archive(mojo::PlatformHandle src_file_handle,
23                mojo::PlatformHandle zip_file_handle,
24                const std::string& filename_in_zip,
25                const std::string& password,
26                ArchiveCallback callback) override;
27 
28  private:
29   mojo::Receiver<mojom::ZipArchiver> receiver_;
30 
31   DISALLOW_COPY_AND_ASSIGN(ZipArchiverImpl);
32 };
33 
34 }  // namespace chrome_cleaner
35 
36 #endif  // CHROME_CHROME_CLEANER_ZIP_ARCHIVER_TARGET_ZIP_ARCHIVER_IMPL_H_
37