LCOV - code coverage report
Current view: top level - ipc/chromium/src/base - process_posix.cc (source / functions) Hit Total Coverage
Test: output.info Lines: 5 21 23.8 %
Date: 2017-07-14 16:53:18 Functions: 2 8 25.0 %
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) 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 "base/process.h"
       8             : #include "base/process_util.h"
       9             : 
      10             : namespace base {
      11             : 
      12           0 : void Process::Close() {
      13           0 :   process_ = 0;
      14             :   // if the process wasn't termiated (so we waited) or the state
      15             :   // wasn't already collected w/ a wait from process_utils, we're gonna
      16             :   // end up w/ a zombie when it does finally exit.
      17           0 : }
      18             : 
      19           0 : void Process::Terminate(int result_code) {
      20             :   // result_code isn't supportable.
      21           0 :   if (!process_)
      22           0 :     return;
      23             :   // We don't wait here. It's the responsibility of other code to reap the
      24             :   // child.
      25           0 :   KillProcess(process_, result_code, false);
      26             : }
      27             : 
      28           0 : bool Process::IsProcessBackgrounded() const {
      29             :   // http://code.google.com/p/chromium/issues/detail?id=8083
      30           0 :   return false;
      31             : }
      32             : 
      33           0 : bool Process::SetProcessBackgrounded(bool value) {
      34             :   // http://code.google.com/p/chromium/issues/detail?id=8083
      35             :   // Just say we did it to keep renderer happy at the moment.  Need to finish
      36             :   // cleaning this up w/in higher layers since windows is probably the only
      37             :   // one that can raise priorities w/o privileges.
      38           0 :   return true;
      39             : }
      40             : 
      41           0 : bool Process::EmptyWorkingSet() {
      42             :   // http://code.google.com/p/chromium/issues/detail?id=8083
      43           0 :   return false;
      44             : }
      45             : 
      46           2 : ProcessId Process::pid() const {
      47           2 :   if (process_ == 0)
      48           0 :     return 0;
      49             : 
      50           2 :   return GetProcId(process_);
      51             : }
      52             : 
      53           0 : bool Process::is_current() const {
      54           0 :   return process_ == GetCurrentProcessHandle();
      55             : }
      56             : 
      57             : // static
      58           2 : Process Process::Current() {
      59           2 :   return Process(GetCurrentProcessHandle());
      60             : }
      61             : 
      62             : }  // namspace base

Generated by: LCOV version 1.13