Bug 913953 - Part z: Remove unused GetServicePackLevel function; r=ehsan
authorMs2ger <ms2ger@gmail.com>
Tue, 10 Sep 2013 09:03:37 +0200
changeset 159154 7daf2ec505cda7b734565a52731db84e5176c6f7
parent 159153 f4f37a20c5e5d830318aa716b5c2809e0dba949f
child 159155 6d3ca3b813539bbd93dfca68a003e8b2ec393775
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs913953
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 913953 - Part z: Remove unused GetServicePackLevel function; r=ehsan
ipc/chromium/src/base/win_util.cc
ipc/chromium/src/base/win_util.h
--- a/ipc/chromium/src/base/win_util.cc
+++ b/ipc/chromium/src/base/win_util.cc
@@ -70,34 +70,16 @@ WinVersion GetWinVersion() {
     } else if (version_info.dwMajorVersion > 6) {
       win_version = WINVERSION_WIN7;
     }
     checked_version = true;
   }
   return win_version;
 }
 
-void GetServicePackLevel(int* major, int* minor) {
-  DCHECK(major && minor);
-  static bool checked_version = false;
-  static int service_pack_major = -1;
-  static int service_pack_minor = -1;
-  if (!checked_version) {
-    OSVERSIONINFOEX version_info = {0};
-    version_info.dwOSVersionInfoSize = sizeof(version_info);
-    GetVersionEx(reinterpret_cast<OSVERSIONINFOW*>(&version_info));
-    service_pack_major = version_info.wServicePackMajor;
-    service_pack_minor = version_info.wServicePackMinor;
-    checked_version = true;
-  }
-
-  *major = service_pack_major;
-  *minor = service_pack_minor;
-}
-
 bool IsShiftPressed() {
   return (::GetKeyState(VK_SHIFT) & 0x80) == 0x80;
 }
 
 bool IsCtrlPressed() {
   return (::GetKeyState(VK_CONTROL) & 0x80) == 0x80;
 }
 
--- a/ipc/chromium/src/base/win_util.h
+++ b/ipc/chromium/src/base/win_util.h
@@ -27,19 +27,16 @@ enum WinVersion {
   WINVERSION_WIN7 = 6
 };
 
 void GetNonClientMetrics(NONCLIENTMETRICS* metrics);
 
 // Returns the running version of Windows.
 WinVersion GetWinVersion();
 
-// Returns the major and minor version of the service pack installed.
-void GetServicePackLevel(int* major, int* minor);
-
 // Returns true if the shift key is currently pressed.
 bool IsShiftPressed();
 
 // Returns true if the ctrl key is currently pressed.
 bool IsCtrlPressed();
 
 // Returns true if the alt key is currently pressed.
 bool IsAltPressed();