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

Side by Side Diff: update_attempter.cc

Issue 6154003: AU: Reduce instances of signalling the crash reporter. (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« omaha_request_action.cc ('K') | « omaha_request_action_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "update_engine/update_attempter.h" 5 #include "update_engine/update_attempter.h"
6 6
7 // From 'man clock_gettime': feature test macro: _POSIX_C_SOURCE >= 199309L 7 // From 'man clock_gettime': feature test macro: _POSIX_C_SOURCE >= 199309L
8 #ifndef _POSIX_C_SOURCE 8 #ifndef _POSIX_C_SOURCE
9 #define _POSIX_C_SOURCE 199309L 9 #define _POSIX_C_SOURCE 199309L
10 #endif // _POSIX_C_SOURCE 10 #endif // _POSIX_C_SOURCE
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 ActionExitCode code) { 275 ActionExitCode code) {
276 CHECK(response_handler_action_); 276 CHECK(response_handler_action_);
277 LOG(INFO) << "Processing Done."; 277 LOG(INFO) << "Processing Done.";
278 actions_.clear(); 278 actions_.clear();
279 279
280 // Reset process priority back to normal. 280 // Reset process priority back to normal.
281 CleanupPriorityManagement(); 281 CleanupPriorityManagement();
282 282
283 if (status_ == UPDATE_STATUS_REPORTING_ERROR_EVENT) { 283 if (status_ == UPDATE_STATUS_REPORTING_ERROR_EVENT) {
284 LOG(INFO) << "Error event sent."; 284 LOG(INFO) << "Error event sent.";
285 // Tell crash reporter there was a problem. 285 if (utils::IsOfficialBuild() && code == kActionCodeSuccess) {
286 utils::ScheduleCrashReporterUpload(); 286 LOG(INFO) << "Signalling crash reporter.";
287 // Tell crash reporter there was a problem.
288 utils::ScheduleCrashReporterUpload();
289 }
287 SetStatusAndNotify(UPDATE_STATUS_IDLE); 290 SetStatusAndNotify(UPDATE_STATUS_IDLE);
288 return; 291 return;
289 } 292 }
290 293
291 if (code == kActionCodeSuccess) { 294 if (code == kActionCodeSuccess) {
292 utils::WriteFile(kUpdateCompletedMarker, "", 0); 295 utils::WriteFile(kUpdateCompletedMarker, "", 0);
293 prefs_->SetInt64(kPrefsDeltaUpdateFailures, 0); 296 prefs_->SetInt64(kPrefsDeltaUpdateFailures, 0);
294 prefs_->SetString(kPrefsPreviousVersion, omaha_request_params_.app_version); 297 prefs_->SetString(kPrefsPreviousVersion, omaha_request_params_.app_version);
295 DeltaPerformer::ResetUpdateProgress(prefs_, false); 298 DeltaPerformer::ResetUpdateProgress(prefs_, false);
296 SetStatusAndNotify(UPDATE_STATUS_UPDATED_NEED_REBOOT); 299 SetStatusAndNotify(UPDATE_STATUS_UPDATED_NEED_REBOOT);
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 uint64_t resume_offset = manifest_metadata_size + next_data_offset; 576 uint64_t resume_offset = manifest_metadata_size + next_data_offset;
574 if (resume_offset < response_handler_action_->install_plan().size) { 577 if (resume_offset < response_handler_action_->install_plan().size) {
575 fetcher->AddRange(resume_offset, -1); 578 fetcher->AddRange(resume_offset, -1);
576 } 579 }
577 } else { 580 } else {
578 fetcher->AddRange(0, -1); 581 fetcher->AddRange(0, -1);
579 } 582 }
580 } 583 }
581 584
582 } // namespace chromeos_update_engine 585 } // namespace chromeos_update_engine
OLDNEW
« omaha_request_action.cc ('K') | « omaha_request_action_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698