1 // Copyright 2014 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.
5 #ifndef MOJO_TOOLS_PACKAGE_MANAGER_UNPACKER_H_
6 #define MOJO_TOOLS_PACKAGE_MANAGER_UNPACKER_H_
8 #include "base/files/file_path.h"
9 #include "base/memory/ref_counted.h"
10 #include "mojo/public/cpp/system/macros.h"
14 // Unzips a package into a temporary folder. The temporary folder will be
15 // deleted when the object is destroyed.
17 // In the future, this class would probably manage doing the unzip operation on
18 // a background thread.
24 // Actually does the unpacking, returns true on success.
25 bool Unpack(const base::FilePath& zip_file);
27 // The root directory where the package has been unpacked.
28 const base::FilePath& dir() const { return dir_; }
31 base::FilePath zip_file_;
35 MOJO_DISALLOW_COPY_AND_ASSIGN(Unpacker);
40 #endif // MOJO_TOOLS_PACKAGE_MANAGER_UNPACKER_H_