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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/package_manager/unpacker.h
diff --git a/mojo/tools/package_manager/unpacker.h b/mojo/tools/package_manager/unpacker.h
new file mode 100644
index 0000000000000000000000000000000000000000..2f7acc590f8d1debd85847750bf4f2600356ed88
--- /dev/null
+++ b/mojo/tools/package_manager/unpacker.h
@@ -0,0 +1,40 @@
+// Copyright 2014 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.
+
+#ifndef MOJO_TOOLS_PACKAGE_MANAGER_UNPACKER_H_
+#define MOJO_TOOLS_PACKAGE_MANAGER_UNPACKER_H_
+
+#include "base/files/file_path.h"
+#include "base/memory/ref_counted.h"
+#include "mojo/public/cpp/system/macros.h"
+
+namespace mojo {
+
+// Unzips a package into a temporary folder. The temporary folder will be
+// deleted when the object is destroyed.
+//
+// In the future, this class would probably manage doing the unzip operation on
+// a background thread.
+class Unpacker {
+ public:
+ Unpacker();
+ ~Unpacker();
+
+ // Actually does the unpacking, returns true on success.
+ bool Unpack(const base::FilePath& zip_file);
+
+ // The root directory where the package has been unpacked.
+ const base::FilePath& dir() const { return dir_; }
+
+ private:
+ base::FilePath zip_file_;
+
+ base::FilePath dir_;
+
+ MOJO_DISALLOW_COPY_AND_ASSIGN(Unpacker);
+};
+
+} // namespace mojo
+
+#endif // MOJO_TOOLS_PACKAGE_MANAGER_UNPACKER_H_
« 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