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

Unified Diff: omaha_response_handler_action.cc

Issue 3521016: AU: Start checkpointing update progress. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: address review comments Created 10 years, 2 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_response_handler_action.h ('k') | omaha_response_handler_action_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: omaha_response_handler_action.cc
diff --git a/omaha_response_handler_action.cc b/omaha_response_handler_action.cc
index 75776abe6c5dd83dc26bc54d0cd31c4decbdc18e..cdcf73544391e5ed3d70179cb844df2cc6b88f5f 100644
--- a/omaha_response_handler_action.cc
+++ b/omaha_response_handler_action.cc
@@ -1,22 +1,20 @@
-// Copyright (c) 2009 The Chromium 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.
#include "update_engine/omaha_response_handler_action.h"
+
#include <string>
+
+#include <base/logging.h>
+
+#include "update_engine/prefs_interface.h"
#include "update_engine/utils.h"
using std::string;
namespace chromeos_update_engine {
-namespace {
-// If the file part of the download URL contains kFullUpdateTag, then and
-// only then do we assume it's a full update. Otherwise, we assume it's a
-// delta update.
-const string kFullUpdateTag = "_FULL_";
-} // namespace
-
void OmahaResponseHandlerAction::PerformAction() {
CHECK(HasInputObject());
ScopedActionCompleter completer(processor_, this);
@@ -29,6 +27,12 @@ void OmahaResponseHandlerAction::PerformAction() {
install_plan_.download_url = response.codebase;
install_plan_.size = response.size;
install_plan_.download_hash = response.hash;
+ // TODO(petkov): Decide here if this is going to be a regular update or
+ // resume-after-boot. This should also set the number of ops performed so far
+ // to invalid if no need to resume.
+ LOG_IF(WARNING, !prefs_->SetString(kPrefsUpdateCheckResponseHash,
+ response.hash))
+ << "Unable to save the update check response hash.";
TEST_AND_RETURN(GetInstallDev(
(!boot_device_.empty() ? boot_device_ : utils::BootDevice()),
&install_plan_.install_path));
« no previous file with comments | « omaha_response_handler_action.h ('k') | omaha_response_handler_action_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698