Backout 10b455909e94 for bustage on windows.
authorScott Johnson <sjohnson@mozilla.com>
Mon, 30 Jan 2012 18:46:41 -0600
changeset 85775 15ca5d162a81dad7cd563c338dfce6ea7f603aca
parent 85774 f8ea7f4307ca47cd5ed10c78d9132793b369d5bc
child 85776 de33a82cee1f3f22326bba3375d6f55d48a7c53d
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
milestone12.0a1
backs out10b455909e944bad69d160653477d77e02a3b44f
Backout 10b455909e94 for bustage on windows.
dom/power/Makefile.in
dom/power/PowerManager.cpp
dom/power/PowerManagerService.cpp
--- a/dom/power/Makefile.in
+++ b/dom/power/Makefile.in
@@ -63,11 +63,9 @@ XPIDLSRCS = \
   nsIDOMPowerManager.idl \
   nsIPowerManagerService.idl \
   $(NULL)
 
 ifdef ENABLE_TESTS
 DIRS += test
 endif
 
-include $(topsrcdir)/config/config.mk
-include $(topsrcdir)/ipc/chromium/chromium-config.mk
 include $(topsrcdir)/config/rules.mk
--- a/dom/power/PowerManager.cpp
+++ b/dom/power/PowerManager.cpp
@@ -30,21 +30,19 @@
  * 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 "nsDOMClassInfoID.h"
+
 #include "PowerManager.h"
-#include "nsContentUtils.h"
-#include "nsDOMClassInfoID.h"
-#include "nsIPowerManagerService.h"
-#include "nsServiceManagerUtils.h"
 
 DOMCI_DATA(MozPowerManager, mozilla::dom::power::PowerManager)
 
 namespace mozilla {
 namespace dom {
 namespace power {
 
 NS_INTERFACE_MAP_BEGIN(PowerManager)
@@ -54,36 +52,20 @@ NS_INTERFACE_MAP_BEGIN(PowerManager)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_ADDREF(PowerManager)
 NS_IMPL_RELEASE(PowerManager)
 
 NS_IMETHODIMP
 PowerManager::Reboot()
 {
-  NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_DOM_SECURITY_ERR);
-
-  nsCOMPtr<nsIPowerManagerService> pmService =
-    do_GetService(POWERMANAGERSERVICE_CONTRACTID);
-  NS_ENSURE_TRUE(pmService, NS_OK);
-
-  pmService->Reboot();
-
-  return NS_OK;
+  return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 PowerManager::PowerOff()
 {
-  NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_DOM_SECURITY_ERR);
-
-  nsCOMPtr<nsIPowerManagerService> pmService =
-    do_GetService(POWERMANAGERSERVICE_CONTRACTID);
-  NS_ENSURE_TRUE(pmService, NS_OK);
-
-  pmService->PowerOff();
-
-  return NS_OK;
+  return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 } // power
 } // dom
 } // mozilla
--- a/dom/power/PowerManagerService.cpp
+++ b/dom/power/PowerManagerService.cpp
@@ -30,17 +30,16 @@
  * 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 "mozilla/Hal.h"
 #include "PowerManagerService.h"
 
 namespace mozilla {
 namespace dom {
 namespace power {
 
 NS_IMPL_ISUPPORTS1(PowerManagerService, nsIPowerManagerService)
 
@@ -52,22 +51,20 @@ PowerManagerService::GetInstance()
   pmService = new PowerManagerService();
 
   return pmService.forget();
 }
 
 NS_IMETHODIMP
 PowerManagerService::Reboot()
 {
-  hal::Reboot();
-  return NS_OK;
+  return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 PowerManagerService::PowerOff()
 {
-  hal::PowerOff();
-  return NS_OK;
+  return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 } // power
 } // dom
 } // mozilla