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

Side by Side Diff: omaha_request_action.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: fix for review 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
« no previous file with comments | « no previous file | update_attempter.cc » ('j') | 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/omaha_request_action.h" 5 #include "update_engine/omaha_request_action.h"
6 6
7 #include <inttypes.h> 7 #include <inttypes.h>
8 8
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // the processor that we're done. 337 // the processor that we're done.
338 void OmahaRequestAction::TransferComplete(HttpFetcher *fetcher, 338 void OmahaRequestAction::TransferComplete(HttpFetcher *fetcher,
339 bool successful) { 339 bool successful) {
340 ScopedActionCompleter completer(processor_, this); 340 ScopedActionCompleter completer(processor_, this);
341 LOG(INFO) << "Omaha request response: " << string(response_buffer_.begin(), 341 LOG(INFO) << "Omaha request response: " << string(response_buffer_.begin(),
342 response_buffer_.end()); 342 response_buffer_.end());
343 343
344 // Events are best effort transactions -- assume they always succeed. 344 // Events are best effort transactions -- assume they always succeed.
345 if (IsEvent()) { 345 if (IsEvent()) {
346 CHECK(!HasOutputPipe()) << "No output pipe allowed for event requests."; 346 CHECK(!HasOutputPipe()) << "No output pipe allowed for event requests.";
347 if (event_->result == OmahaEvent::kResultError && successful &&
348 utils::IsOfficialBuild()) {
349 LOG(INFO) << "Signalling Crash Reporter.";
350 utils::ScheduleCrashReporterUpload();
351 }
347 completer.set_code(kActionCodeSuccess); 352 completer.set_code(kActionCodeSuccess);
348 return; 353 return;
349 } 354 }
350 355
351 if (!successful) { 356 if (!successful) {
352 LOG(ERROR) << "Omaha request network transfer failed."; 357 LOG(ERROR) << "Omaha request network transfer failed.";
353 int code = GetHTTPResponseCode(); 358 int code = GetHTTPResponseCode();
354 // Makes sure we send sane error values. 359 // Makes sure we send sane error values.
355 if (code < 0 || code >= 1000) { 360 if (code < 0 || code >= 1000) {
356 code = 999; 361 code = 999;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 output_object.needs_admin = 449 output_object.needs_admin =
445 XmlGetProperty(updatecheck_node, "needsadmin") == "true"; 450 XmlGetProperty(updatecheck_node, "needsadmin") == "true";
446 output_object.prompt = XmlGetProperty(updatecheck_node, "Prompt") == "true"; 451 output_object.prompt = XmlGetProperty(updatecheck_node, "Prompt") == "true";
447 output_object.is_delta = 452 output_object.is_delta =
448 XmlGetProperty(updatecheck_node, "IsDelta") == "true"; 453 XmlGetProperty(updatecheck_node, "IsDelta") == "true";
449 output_object.deadline = XmlGetProperty(updatecheck_node, "deadline"); 454 output_object.deadline = XmlGetProperty(updatecheck_node, "deadline");
450 SetOutputObject(output_object); 455 SetOutputObject(output_object);
451 } 456 }
452 457
453 }; // namespace chromeos_update_engine 458 }; // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « no previous file | update_attempter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698