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

Unified Diff: src/platform/update_engine/install_action.h

Issue 545072: AU: Gut code for old updater. New protobuf for v2 updater. (Closed)
Patch Set: better comments Created 10 years, 11 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
Index: src/platform/update_engine/install_action.h
diff --git a/src/platform/update_engine/install_action.h b/src/platform/update_engine/install_action.h
deleted file mode 100644
index 8bed632210e077c43c40b20d5c48dee59530a903..0000000000000000000000000000000000000000
--- a/src/platform/update_engine/install_action.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// 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.
-
-#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_INSTALL_ACTION_H__
-#define CHROMEOS_PLATFORM_UPDATE_ENGINE_INSTALL_ACTION_H__
-
-#include "base/scoped_ptr.h"
-#include "update_engine/action.h"
-#include "update_engine/delta_diff_parser.h"
-#include "update_engine/install_plan.h"
-#include "update_engine/update_metadata.pb.h"
-
-// The Install Action is responsible for ensuring the update that's been
-// downloaded has been installed. This may be a no-op in the case of a full
-// update, since those will be downloaded directly into the destination
-// partition. However, for a delta update some work is required.
-
-// An InstallPlan struct must be passed to this action before PerformAction()
-// is called so that this action knows if it's a delta update, and if so,
-// what the paths are.
-
-// TODO(adlr): At the moment, InstallAction is synchronous. It should be
-// updated to be asynchronous at some point.
-
-namespace chromeos_update_engine {
-
-class InstallAction;
-class NoneType;
-
-template<>
-class ActionTraits<InstallAction> {
- public:
- // Takes the InstallPlan for input
- typedef InstallPlan InputObjectType;
- // On success, puts the output device path on output
- typedef std::string OutputObjectType;
-};
-
-class InstallAction : public Action<InstallAction> {
- public:
- InstallAction() {}
- typedef ActionTraits<InstallAction>::InputObjectType InputObjectType;
- typedef ActionTraits<InstallAction>::OutputObjectType OutputObjectType;
- void PerformAction();
-
- // This action is synchronous for now.
- void TerminateProcessing() { CHECK(false); }
-
- // Debugging/logging
- static std::string StaticType() { return "InstallAction"; }
- std::string Type() const { return StaticType(); }
-
- private:
- // Installs 'file' into mountpoint. 'path' is the path that 'file'
- // should have when we reboot and mountpoint is root.
- bool InstallFile(const std::string& mountpoint,
- const DeltaArchiveManifest_File& file,
- const std::string& path,
- const DeltaDiffParser& parser) const;
- // These are helpers for InstallFile. They focus on specific file types:
- // Regular data files:
- bool InstallFileRegularFile(const std::string& mountpoint,
- const DeltaArchiveManifest_File& file,
- const std::string& path,
- const DeltaDiffParser& parser,
- const bool exists) const;
- // char/block devices, fifos, and sockets:
- bool InstallFileSpecialFile(const std::string& mountpoint,
- const DeltaArchiveManifest_File& file,
- const std::string& path,
- const DeltaDiffParser& parser,
- const bool exists) const;
- // symlinks:
- bool InstallFileSymlink(const std::string& mountpoint,
- const DeltaArchiveManifest_File& file,
- const std::string& path,
- const DeltaDiffParser& parser,
- const bool exists) const;
-
- DISALLOW_COPY_AND_ASSIGN(InstallAction);
-};
-
-} // namespace chromeos_update_engine
-
-#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_INSTALL_ACTION_H__

Powered by Google App Engine
This is Rietveld 408576698