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

Unified Diff: omaha_request_prep_action.h

Issue 2836053: Turn OmahaRequestPrepAction into OmahaRequestDeviceParams. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: Update copyrights. Created 10 years, 5 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 | « omaha_request_params_unittest.cc ('k') | update_attempter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: omaha_request_prep_action.h
diff --git a/omaha_request_prep_action.h b/omaha_request_prep_action.h
deleted file mode 100644
index 794cfb719a084395148ffa309b1e1f870b563931..0000000000000000000000000000000000000000
--- a/omaha_request_prep_action.h
+++ /dev/null
@@ -1,75 +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_OMAHA_RESQUEST_PREP_ACTION_H__
-#define CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_RESQUEST_PREP_ACTION_H__
-
-#include <string>
-#include "update_engine/action.h"
-#include "update_engine/omaha_request_action.h"
-
-// This gathers local system information and prepares info used by the
-// update check action.
-
-namespace chromeos_update_engine {
-
-class OmahaRequestPrepAction;
-class NoneType;
-
-template<>
-class ActionTraits<OmahaRequestPrepAction> {
- public:
- typedef NoneType InputObjectType;
- typedef OmahaRequestParams OutputObjectType;
-};
-
-class OmahaRequestPrepAction : public Action<OmahaRequestPrepAction> {
- public:
- explicit OmahaRequestPrepAction(bool force_full_update)
- : force_full_update_(force_full_update) {}
- typedef ActionTraits<OmahaRequestPrepAction>::InputObjectType
- InputObjectType;
- typedef ActionTraits<OmahaRequestPrepAction>::OutputObjectType
- OutputObjectType;
- void PerformAction();
-
- // This is a synchronous action, and thus TerminateProcessing() should
- // never be called
- void TerminateProcessing() { CHECK(false); }
-
- // Debugging/logging
- static std::string StaticType() { return "OmahaRequestPrepAction"; }
- std::string Type() const { return StaticType(); }
-
- // For unit-tests.
- void set_root(const std::string& root) {
- root_ = root;
- }
-
- private:
- // Gets a machine-local ID (for now, first MAC address we find)
- bool GetMachineId(std::string* out_id) const;
-
- // Fetches the value for a given key from
- // /mnt/stateful_partition/etc/lsb-release if possible. Failing that,
- // it looks for the key in /etc/lsb-release .
- std::string GetLsbValue(const std::string& key,
- const std::string& default_value) const;
-
- // Gets the machine type (e.g. "i686")
- std::string GetMachineType() const;
-
- // Set to true if this should set up the Update Check Action to do
- // a full update
- bool force_full_update_;
-
- // When reading files, prepend root_ to the paths. Useful for testing.
- std::string root_;
-
- DISALLOW_COPY_AND_ASSIGN(OmahaRequestPrepAction);
-};
-
-} // namespace chromeos_update_engine
-
-#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_RESQUEST_PREP_ACTION_H__
« no previous file with comments | « omaha_request_params_unittest.cc ('k') | update_attempter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698