1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39

content / public / browser / background_fetch_response.cc [blame]

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/public/browser/background_fetch_response.h"

namespace content {

BackgroundFetchResponse::BackgroundFetchResponse(
    const std::vector<GURL>& url_chain,
    const scoped_refptr<const net::HttpResponseHeaders>& headers)
    : url_chain(url_chain), headers(headers) {}

BackgroundFetchResponse::~BackgroundFetchResponse() = default;

BackgroundFetchResult::BackgroundFetchResult(
    std::unique_ptr<BackgroundFetchResponse> response,
    base::Time response_time,
    FailureReason failure_reason)
    : response(std::move(response)),
      response_time(response_time),
      failure_reason(failure_reason) {}

BackgroundFetchResult::BackgroundFetchResult(
    std::unique_ptr<BackgroundFetchResponse> response,
    base::Time response_time,
    const base::FilePath& path,
    std::optional<storage::BlobDataHandle> blob_handle,
    uint64_t file_size)
    : response(std::move(response)),
      response_time(response_time),
      file_path(path),
      blob_handle(blob_handle),
      file_size(file_size),
      failure_reason(FailureReason::NONE) {}

BackgroundFetchResult::~BackgroundFetchResult() = default;

}  // namespace content