ipc/chromium/src/base/cpu.h

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
     2 // Use of this source code is governed by a BSD-style license that can be
     3 // found in the LICENSE file.
     5 #ifndef BASE_CPU_H_
     6 #define BASE_CPU_H_
     8 #include <string>
    10 namespace base {
    12 // Query information about the processor.
    13 class CPU {
    14  public:
    15   // Constructor
    16   CPU();
    18   // Accessors for CPU information.
    19   const std::string& vendor_name() const { return cpu_vendor_; }
    20   int stepping() const { return stepping_; }
    21   int model() const { return model_; }
    22   int family() const { return family_; }
    23   int type() const { return type_; }
    24   int extended_model() const { return ext_model_; }
    25   int extended_family() const { return ext_family_; }
    27  private:
    28   // Query the processor for CPUID information.
    29   void Initialize();
    31   int type_;  // process type
    32   int family_;  // family of the processor
    33   int model_;  // model of processor
    34   int stepping_;  // processor revision number
    35   int ext_model_;
    36   int ext_family_;
    37   std::string cpu_vendor_;
    38 };
    40 }  // namespace base
    42 #endif  // BASE_CPU_H_

mercurial