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

Unified Diff: install_plan.h

Issue 3541016: AU: Optimize checkpointing a bit and decide on new update vs. resume. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: fix copyrights 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 | « filesystem_copier_action_unittest.cc ('k') | omaha_response_handler_action.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: install_plan.h
diff --git a/install_plan.h b/install_plan.h
index 19fee8a2add02312b6cc583cb3552c83043bf3ef..8dc42aa722f973d29226ed3a73c0651f41023be5 100644
--- a/install_plan.h
+++ b/install_plan.h
@@ -1,4 +1,4 @@
-// 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.
@@ -15,20 +15,23 @@ namespace chromeos_update_engine {
struct InstallPlan {
InstallPlan(bool is_full,
+ bool is_resume,
const std::string& url,
uint64_t size,
const std::string& hash,
const std::string& install_path,
const std::string& kernel_install_path)
: is_full_update(is_full),
+ is_resume(is_resume),
download_url(url),
size(size),
download_hash(hash),
install_path(install_path),
kernel_install_path(kernel_install_path) {}
- InstallPlan() : is_full_update(false) {}
+ InstallPlan() : is_full_update(false), is_resume(false), size(0) {}
bool is_full_update;
+ bool is_resume;
std::string download_url; // url to download from
uint64_t size; // size of the download url's data
std::string download_hash; // hash of the data at the url
@@ -37,11 +40,12 @@ struct InstallPlan {
bool operator==(const InstallPlan& that) const {
return (is_full_update == that.is_full_update) &&
- (download_url == that.download_url) &&
- (size == that.size) &&
- (download_hash == that.download_hash) &&
- (install_path == that.install_path) &&
- (kernel_install_path == that.kernel_install_path);
+ (is_resume == that.is_resume) &&
+ (download_url == that.download_url) &&
+ (size == that.size) &&
+ (download_hash == that.download_hash) &&
+ (install_path == that.install_path) &&
+ (kernel_install_path == that.kernel_install_path);
}
bool operator!=(const InstallPlan& that) const {
return !((*this) == that);
@@ -49,6 +53,7 @@ struct InstallPlan {
void Dump() const {
LOG(INFO) << "InstallPlan: "
<< (is_full_update ? "full_update" : "delta_update")
+ << (is_resume ? ", resume" : ", new_update")
<< ", url: " << download_url
<< ", size: " << size
<< ", hash: " << download_hash
« no previous file with comments | « filesystem_copier_action_unittest.cc ('k') | omaha_response_handler_action.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698