AU: Beginnings of delta support
- proto file for delta files; still needs hardlink support
- code to generate a delta update from two directory trees (old, new).
- code to parse delta update
- Actions: postinst-runner, install, bootable flag setter, filesystem
copier, Omaha response handler, Omaha request preparer,
- misc utility functions, like StringHasSuffix(), templatized Action
classes to feed/collect an object from another action.
- FilesystemIterator: iterates a directory tree with optional
exclusion path. Tolerates deleting of files during iteration.
- Subprocess class: support for synchronously or asynchronously
running an external command. Doesn't pass any env variables.
- Integration test that strings many Actions together and tests using
actual Omaha/Lorry. Currently only tests full updates.
- New simple HTTP server for unittest that supports fake flaky
connections.
- Some refactoring.
Review URL: http://codereview.chromium.org/466036
git-svn-id: svn://chrome-svn/chromeos/trunk@334 06c00378-0e64-4dae-be16-12b19f9950a1
diff --git a/action.h b/action.h
index 15f72df..af6deee 100644
--- a/action.h
+++ b/action.h
@@ -2,17 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UPDATE_ENGINE_ACTION_H__
-#define UPDATE_ENGINE_ACTION_H__
+#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_H__
+#define CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_H__
#include <stdio.h>
#include <tr1/memory>
#include <iostream>
-
#include "base/basictypes.h"
-#include <base/logging.h>
-
+#include "chromeos/obsolete_logging.h"
#include "update_engine/action_processor.h"
+#include "update_engine/action_pipe.h"
// The structure of these classes (Action, ActionPipe, ActionProcessor, etc.)
// is based on the KSAction* classes from the Google Update Engine code at
@@ -157,7 +156,7 @@
out_pipe) {
out_pipe_ = out_pipe;
}
- protected:
+
// Returns true iff there is an associated input pipe. If there's an input
// pipe, there's an input object, but it may have been constructed with the
// default ctor if the previous action didn't call SetOutputObject().
@@ -184,6 +183,13 @@
out_pipe_->set_contents(out_obj);
}
+ // Returns a reference to the object sitting in the output pipe.
+ const typename ActionTraits<SubClass>::OutputObjectType& GetOutputObject() {
+ CHECK(HasOutputPipe());
+ return out_pipe_->contents();
+ }
+
+protected:
// We use a shared_ptr to the pipe. shared_ptr objects destroy what they
// point to when the last such shared_ptr object dies. We consider the
// Actions on either end of a pipe to "own" the pipe. When the last Action
@@ -196,4 +202,4 @@
}; // namespace chromeos_update_engine
-#endif // UPDATE_ENGINE_ACTION_H__
+#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_H__