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

Unified Diff: src/platform/update_engine/generate_delta_main.cc

Issue 465067: Missed new files in last commit
Patch Set: Created 11 years 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 | « src/platform/update_engine/filesystem_iterator_unittest.cc ('k') | src/platform/update_engine/gzip.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/update_engine/generate_delta_main.cc
diff --git a/src/platform/update_engine/generate_delta_main.cc b/src/platform/update_engine/generate_delta_main.cc
new file mode 100644
index 0000000000000000000000000000000000000000..14af193a9eb2d1b451d19e091a578f127f08c021
--- /dev/null
+++ b/src/platform/update_engine/generate_delta_main.cc
@@ -0,0 +1,48 @@
+// Copyright (c) 2009 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.
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include <algorithm>
+#include <string>
+#include <vector>
+#include <tr1/memory>
+
+#include <glib.h>
+
+#include "chromeos/obsolete_logging.h"
+#include "update_engine/subprocess.h"
+#include "update_engine/update_metadata.pb.h"
+
+using std::sort;
+using std::string;
+using std::vector;
+using std::tr1::shared_ptr;
+
+// This file contains a simple program that takes an old path, a new path,
+// and an output file as arguments and the path to an output file and
+// generates a delta that can be sent to Chrome OS clients.
+
+namespace chromeos_update_engine {
+
+int main(int argc, char** argv) {
+ g_thread_init(NULL);
+ Subprocess::Init();
+ if (argc != 4) {
+ usage(argv[0]);
+ }
+ const char* old_dir = argv[1];
+ const char* new_dir = argv[2];
+ if ((!IsDir(old_dir)) || (!IsDir(new_dir))) {
+ usage(argv[0]);
+ }
+ // TODO(adlr): implement using DeltaDiffGenerator
+ return 0;
+}
« no previous file with comments | « src/platform/update_engine/filesystem_iterator_unittest.cc ('k') | src/platform/update_engine/gzip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698