Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: mojo/tools/package_manager/unpacker.h

Issue 596913002: Add mojo package manager skeleton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef MOJO_TOOLS_PACKAGE_MANAGER_UNPACKER_H_
6 #define MOJO_TOOLS_PACKAGE_MANAGER_UNPACKER_H_
7
8 #include "base/files/file_path.h"
9 #include "base/memory/ref_counted.h"
10 #include "mojo/public/cpp/system/macros.h"
11
12 namespace mojo {
13
14 // Unzips a package into a temporary folder. The temporary folder will be
15 // deleted when the object is destroyed.
16 //
17 // In the future, this class would probably manage doing the unzip operation on
18 // a background thread.
19 class Unpacker {
20 public:
21 Unpacker();
22 ~Unpacker();
23
24 // Actually does the unpacking, returns true on success.
25 bool Unpack(const base::FilePath& zip_file);
26
27 // The root directory where the package has been unpacked.
28 const base::FilePath& dir() const { return dir_; }
29
30 private:
31 base::FilePath zip_file_;
32
33 base::FilePath dir_;
34
35 MOJO_DISALLOW_COPY_AND_ASSIGN(Unpacker);
36 };
37
38 } // namespace mojo
39
40 #endif // MOJO_TOOLS_PACKAGE_MANAGER_UNPACKER_H_
OLDNEW
« no previous file with comments | « mojo/tools/package_manager/package_manager_application.cc ('k') | mojo/tools/package_manager/unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698