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

Unified Diff: update_attempter.cc

Issue 3044003: AU: send success events to Omaha at more points in the update process. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: 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_action.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: update_attempter.cc
diff --git a/update_attempter.cc b/update_attempter.cc
index 1c32ff4636534a0868be514eea13fab0caa21d1b..7e536b48699c767ad3784bece92672a31e58cf7a 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -113,17 +113,31 @@ void UpdateAttempter::Update() {
new FilesystemCopierAction(false));
shared_ptr<FilesystemCopierAction> kernel_filesystem_copier_action(
new FilesystemCopierAction(true));
+ shared_ptr<OmahaRequestAction> download_started_action(
+ new OmahaRequestAction(omaha_request_params_,
+ new OmahaEvent(
+ OmahaEvent::kTypeUpdateDownloadStarted,
+ OmahaEvent::kResultSuccess,
+ 0),
+ new LibcurlHttpFetcher));
shared_ptr<DownloadAction> download_action(
new DownloadAction(new LibcurlHttpFetcher));
+ shared_ptr<OmahaRequestAction> download_finished_action(
+ new OmahaRequestAction(omaha_request_params_,
+ new OmahaEvent(
+ OmahaEvent::kTypeUpdateDownloadFinished,
+ OmahaEvent::kResultSuccess,
+ 0),
+ new LibcurlHttpFetcher));
shared_ptr<PostinstallRunnerAction> postinstall_runner_action_precommit(
new PostinstallRunnerAction(true));
shared_ptr<SetBootableFlagAction> set_bootable_flag_action(
new SetBootableFlagAction);
shared_ptr<PostinstallRunnerAction> postinstall_runner_action_postcommit(
new PostinstallRunnerAction(false));
- shared_ptr<OmahaRequestAction> install_success_action(
+ shared_ptr<OmahaRequestAction> update_complete_action(
new OmahaRequestAction(omaha_request_params_,
- new OmahaEvent(OmahaEvent::kTypeInstallComplete,
+ new OmahaEvent(OmahaEvent::kTypeUpdateComplete,
OmahaEvent::kResultSuccess,
0),
new LibcurlHttpFetcher));
@@ -136,13 +150,15 @@ void UpdateAttempter::Update() {
actions_.push_back(shared_ptr<AbstractAction>(filesystem_copier_action));
actions_.push_back(shared_ptr<AbstractAction>(
kernel_filesystem_copier_action));
+ actions_.push_back(shared_ptr<AbstractAction>(download_started_action));
actions_.push_back(shared_ptr<AbstractAction>(download_action));
+ actions_.push_back(shared_ptr<AbstractAction>(download_finished_action));
actions_.push_back(shared_ptr<AbstractAction>(
postinstall_runner_action_precommit));
actions_.push_back(shared_ptr<AbstractAction>(set_bootable_flag_action));
actions_.push_back(shared_ptr<AbstractAction>(
postinstall_runner_action_postcommit));
- actions_.push_back(shared_ptr<AbstractAction>(install_success_action));
+ actions_.push_back(shared_ptr<AbstractAction>(update_complete_action));
// Enqueue the actions
for (vector<shared_ptr<AbstractAction> >::iterator it = actions_.begin();
« no previous file with comments | « omaha_request_action.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698