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

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

// Copyright 2019 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/service_process_info.h"

#include "base/process/process.h"

namespace content {

ServiceProcessInfo::ServiceProcessInfo(const std::string& name,
                                       const std::optional<GURL>& site,
                                       const ServiceProcessId& id,
                                       base::Process process)
    : service_interface_name_(name),
      site_(std::move(site)),
      service_process_id_(id),
      process_(std::move(process)) {}

ServiceProcessInfo::ServiceProcessInfo(ServiceProcessInfo&&) = default;
ServiceProcessInfo& ServiceProcessInfo::operator=(ServiceProcessInfo&&) =
    default;

ServiceProcessInfo::~ServiceProcessInfo() = default;

ServiceProcessInfo ServiceProcessInfo::Duplicate() const {
  return ServiceProcessInfo(service_interface_name_, site_, service_process_id_,
                            process_.Duplicate());
}

}  // namespace content