Backout 6a4c4cb828a8 for bustage on windows.
authorScott Johnson <sjohnson@mozilla.com>
Mon, 30 Jan 2012 18:47:43 -0600
changeset 87001 de33a82cee1f3f22326bba3375d6f55d48a7c53d
parent 87000 15ca5d162a81dad7cd563c338dfce6ea7f603aca
child 87002 f64266a2463a3d963e927edd435f48ad8bb7115f
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone12.0a1
backs out6a4c4cb828a8f45133fb6a1c0dcb2c545ffd2b0d
Backout 6a4c4cb828a8 for bustage on windows.
config/system-headers
hal/Hal.cpp
hal/Hal.h
hal/Makefile.in
hal/android/AndroidHal.cpp
hal/fallback/FallbackHal.cpp
hal/linux/Power.cpp
hal/sandbox/PHal.ipdl
hal/sandbox/SandboxHal.cpp
js/src/config/system-headers
--- a/config/system-headers
+++ b/config/system-headers
@@ -724,17 +724,16 @@ sys/poll.h
 sys/ppc.h
 sys/prctl.h
 sys/priv.h
 sys/procfs.h
 sys/pstat.h
 sys/ptrace.h
 sys/queue.h
 sys/quota.h
-sys/reboot.h
 sys/reg.h
 sys/regset.h
 sys/resource.h
 sys/sched.h
 sys/select.h
 sys/sem.h
 sys/sendfile.h
 sys/shm.h
--- a/hal/Hal.cpp
+++ b/hal/Hal.cpp
@@ -367,22 +367,10 @@ GetCurrentNetworkInformation(NetworkInfo
 
 void
 NotifyNetworkChange(const NetworkInformation& aInfo)
 {
   sNetworkObservers.CacheInformation(aInfo);
   sNetworkObservers.BroadcastCachedInformation();
 }
 
-void Reboot()
-{
-  AssertMainThread();
-  PROXY_IF_SANDBOXED(Reboot());
-}
-
-void PowerOff()
-{
-  AssertMainThread();
-  PROXY_IF_SANDBOXED(PowerOff());
-}
-
 } // namespace hal
 } // namespace mozilla
--- a/hal/Hal.h
+++ b/hal/Hal.h
@@ -187,26 +187,16 @@ void UnregisterNetworkObserver(NetworkOb
 void GetCurrentNetworkInformation(hal::NetworkInformation* aNetworkInfo);
 
 /**
  * Notify of a change in the network state.
  * @param aNetworkInfo The new network information.
  */
 void NotifyNetworkChange(const hal::NetworkInformation& aNetworkInfo);
 
-/**
- * Reboot the device.
- */
-void Reboot();
-
-/**
- * Power off the device.
- */
-void PowerOff();
-
 } // namespace MOZ_HAL_NAMESPACE
 } // namespace mozilla
 
 #ifdef MOZ_DEFINED_HAL_NAMESPACE
 # undef MOZ_DEFINED_HAL_NAMESPACE
 # undef MOZ_HAL_NAMESPACE
 #endif
 
--- a/hal/Makefile.in
+++ b/hal/Makefile.in
@@ -67,19 +67,19 @@ CPPSRCS = \
   Hal.cpp \
   SandboxHal.cpp \
   WindowIdentifier.cpp \
   $(NULL)
 
 ifeq (android,$(MOZ_WIDGET_TOOLKIT))
 CPPSRCS += AndroidHal.cpp
 else ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
-CPPSRCS += GonkHal.cpp Power.cpp
+CPPSRCS += GonkHal.cpp
 else ifeq (Linux,$(OS_TARGET))
-CPPSRCS += LinuxHal.cpp Power.cpp
+CPPSRCS += LinuxHal.cpp
 ifdef MOZ_ENABLE_DBUS
 CPPSRCS += UPowerClient.cpp
 endif
 else ifeq (WINNT,$(OS_TARGET))
 CPPSRCS += WindowsHal.cpp WindowsBattery.cpp
 else
 CPPSRCS += FallbackHal.cpp
 endif
--- a/hal/android/AndroidHal.cpp
+++ b/hal/android/AndroidHal.cpp
@@ -168,19 +168,11 @@ GetCurrentNetworkInformation(hal::Networ
   AndroidBridge* bridge = AndroidBridge::Bridge();
   if (!bridge) {
     return;
   }
 
   bridge->GetCurrentNetworkInformation(aNetworkInfo);
 }
 
-void
-Reboot()
-{}
-
-void
-PowerOff()
-{}
-
 } // hal_impl
 } // mozilla
 
--- a/hal/fallback/FallbackHal.cpp
+++ b/hal/fallback/FallbackHal.cpp
@@ -100,18 +100,10 @@ DisableNetworkNotifications()
 
 void
 GetCurrentNetworkInformation(hal::NetworkInformation* aNetworkInfo)
 {
   aNetworkInfo->bandwidth() = dom::network::kDefaultBandwidth;
   aNetworkInfo->canBeMetered() = dom::network::kDefaultCanBeMetered;
 }
 
-void
-Reboot()
-{}
-
-void
-PowerOff()
-{}
-
 } // hal_impl
 } // namespace mozilla
deleted file mode 100644
--- a/hal/linux/Power.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is Mozilla Foundation
- * Portions created by the Initial Developer are Copyright (C) 2011
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Kan-Ru Chen <kchen@mozilla.com> (Original Author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "Hal.h"
-
-#include <unistd.h>
-#include <sys/reboot.h>
-
-namespace mozilla {
-namespace hal_impl {
-
-void
-Reboot()
-{
-  reboot(RB_AUTOBOOT);
-}
-
-void
-PowerOff()
-{
-  reboot(RB_POWER_OFF);
-}
-
-} // hal_impl
-} // mozilla
--- a/hal/sandbox/PHal.ipdl
+++ b/hal/sandbox/PHal.ipdl
@@ -81,16 +81,13 @@ parent:
       returns (NetworkInformation aNetworkInfo);
 
     sync GetScreenEnabled() returns (bool enabled);
     SetScreenEnabled(bool enabled);
 
     sync GetScreenBrightness() returns (double brightness);
     SetScreenBrightness(double brightness);
 
-    Reboot();
-    PowerOff();
-
     __delete__();
 };
 
 } // namespace hal
 } // namespace mozilla
--- a/hal/sandbox/SandboxHal.cpp
+++ b/hal/sandbox/SandboxHal.cpp
@@ -147,28 +147,16 @@ GetScreenBrightness()
 }
 
 void
 SetScreenBrightness(double brightness)
 {
   Hal()->SendSetScreenBrightness(brightness);
 }
 
-void
-Reboot()
-{
-  Hal()->SendReboot();
-}
-
-void
-PowerOff()
-{
-  Hal()->SendPowerOff();
-}
-
 class HalParent : public PHalParent
                 , public BatteryObserver
                 , public NetworkObserver
 {
 public:
   NS_OVERRIDE virtual bool
   RecvVibrate(const InfallibleTArray<unsigned int>& pattern,
               const InfallibleTArray<uint64> &id,
@@ -274,30 +262,16 @@ public:
   }
 
   NS_OVERRIDE virtual bool
   RecvSetScreenBrightness(const double &brightness)
   {
     hal::SetScreenBrightness(brightness);
     return true;
   }
-
-  NS_OVERRIDE virtual bool
-  RecvReboot()
-  {
-    hal::Reboot();
-    return true;
-  }
-
-  NS_OVERRIDE virtual bool
-  RecvPowerOff()
-  {
-    hal::PowerOff();
-    return true;
-  }
 };
 
 class HalChild : public PHalChild {
 public:
   NS_OVERRIDE virtual bool
   RecvNotifyBatteryChange(const BatteryInformation& aBatteryInfo) {
     hal::NotifyBatteryChange(aBatteryInfo);
     return true;
--- a/js/src/config/system-headers
+++ b/js/src/config/system-headers
@@ -724,17 +724,16 @@ sys/poll.h
 sys/ppc.h
 sys/prctl.h
 sys/priv.h
 sys/procfs.h
 sys/pstat.h
 sys/ptrace.h
 sys/queue.h
 sys/quota.h
-sys/reboot.h
 sys/reg.h
 sys/regset.h
 sys/resource.h
 sys/sched.h
 sys/select.h
 sys/sem.h
 sys/sendfile.h
 sys/shm.h