Turn OmahaRequestPrepAction into OmahaRequestDeviceParams.

Pass the params to OmahaRequestAction's ctor. This simplifies a bit
executing as well as testing of OmahaRequestAction and testing of
OmahaRequestDeviceParams. It also allows us to initialize the params
once per update attempt and use them for all OmahaRequestActions.

BUG=560
TEST=unit tests, gmerged on device and forced an update through dev server,
inspected logs.

Review URL: http://codereview.chromium.org/2836053
diff --git a/omaha_request_action.cc b/omaha_request_action.cc
index 9d14a6d..927c7d3 100644
--- a/omaha_request_action.cc
+++ b/omaha_request_action.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -13,6 +13,7 @@
 #include "base/string_util.h"
 #include "chromeos/obsolete_logging.h"
 #include "update_engine/action_pipe.h"
+#include "update_engine/omaha_request_params.h"
 #include "update_engine/utils.h"
 
 using std::string;
@@ -109,16 +110,16 @@
   return string(reinterpret_cast<const char *>(str.get()));
 }
 
-OmahaRequestAction::OmahaRequestAction(OmahaEvent* event,
+OmahaRequestAction::OmahaRequestAction(const OmahaRequestParams& params,
+                                       OmahaEvent* event,
                                        HttpFetcher* http_fetcher)
-    : event_(event),
+    : params_(params),
+      event_(event),
       http_fetcher_(http_fetcher) {}
 
 OmahaRequestAction::~OmahaRequestAction() {}
 
 void OmahaRequestAction::PerformAction() {
-  CHECK(HasInputObject());
-  params_ = GetInputObject();
   http_fetcher_->set_delegate(this);
   string request_post(FormatRequest(event_.get(), params_));
   http_fetcher_->SetPostData(request_post.data(), request_post.size());