LCOV - code coverage report
Current view: top level - ipc/chromium/src/chrome/common - child_process.cc (source / functions) Hit Total Coverage
Test: output.info Lines: 7 13 53.8 %
Date: 2017-07-14 16:53:18 Functions: 1 3 33.3 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
       3             : // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
       4             : // Use of this source code is governed by a BSD-style license that can be
       5             : // found in the LICENSE file.
       6             : 
       7             : #include "chrome/common/child_process.h"
       8             : 
       9             : #include "base/basictypes.h"
      10             : #include "base/string_util.h"
      11             : #include "chrome/common/child_thread.h"
      12             : 
      13             : ChildProcess* ChildProcess::child_process_;
      14             : 
      15           2 : ChildProcess::ChildProcess(ChildThread* child_thread)
      16           2 :     : child_thread_(child_thread) {
      17           2 :   DCHECK(!child_process_);
      18           2 :   child_process_ = this;
      19           2 :   if (child_thread_.get())  // null in unittests.
      20           2 :     child_thread_->Run();
      21           2 : }
      22             : 
      23           0 : ChildProcess::~ChildProcess() {
      24           0 :   DCHECK(child_process_ == this);
      25             : 
      26           0 :   if (child_thread_.get())
      27           0 :     child_thread_->Stop();
      28             : 
      29           0 :   child_process_ = NULL;
      30           0 : }

Generated by: LCOV version 1.13