Skip to content

Commit

Permalink
[Background Fetch] Remove deprecated proto field.
Browse files Browse the repository at this point in the history
The field was deprecated in M71, and is no longer needed

Change-Id: I258b64134cbd95fd99d1a57d43c94d204bd46251
Reviewed-on: https://chromium-review.googlesource.com/c/1426684
Reviewed-by: Mugdha Lakhani <nator@google.com>
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624908}
  • Loading branch information
rayankans authored and Commit Bot committed Jan 22, 2019
1 parent b270239 commit dcdbdf5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
3 changes: 2 additions & 1 deletion content/browser/background_fetch/background_fetch.proto
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ message BackgroundFetchCompletedRequest {
optional int32 request_index = 2;
optional string serialized_request = 3;
optional string download_guid = 4;
optional bool succeeded = 5 [deprecated = true];
optional BackgroundFetchRegistration.BackgroundFetchFailureReason
failure_reason = 6;

reserved 5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,6 @@ void MarkRegistrationForDeletionTask::DidGetCompletedRequests(
return;
}

// TODO(rayankans): Delete this after M71 is out of use.
// |succeeded| was deprecated in favor of |failure_reason|.
// This can happen if a browser was updated while a fetch was ongoing.
if (completed_request.has_succeeded()) {
if (!completed_request.succeeded()) {
// The fetch failed, expose the error as FETCH_ERROR.
failure_reason_ =
blink::mojom::BackgroundFetchFailureReason::FETCH_ERROR;
}
}

if (completed_request.failure_reason() !=
proto::BackgroundFetchRegistration::NONE) {
bool did_convert = MojoFailureReasonFromRegistrationProto(
Expand Down

0 comments on commit dcdbdf5

Please sign in to comment.