Bug 579517 follow-up: Remove NSPR types that crept in
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 23 Aug 2012 11:30:56 -0400
changeset 105210 ef0db3592a2ede23738b37cb989b215cc023fed9
parent 105209 78d6548c9c2340e6d974ca03911a894be412bc29
child 105211 d636babbf53239d1a62d62fc7bc546d86361723e
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
bugs579517
milestone17.0a1
Bug 579517 follow-up: Remove NSPR types that crept in
dom/sms/src/SmsManager.cpp
toolkit/components/alerts/mac/mozNotificationCenterDelegate.h
toolkit/components/alerts/mac/mozNotificationCenterDelegate.mm
--- a/dom/sms/src/SmsManager.cpp
+++ b/dom/sms/src/SmsManager.cpp
@@ -82,17 +82,17 @@ SmsManager::CheckPermissionAndCreateInst
 
   nsCOMPtr<nsIPrincipal> principal = document->NodePrincipal();
   NS_ENSURE_TRUE(principal, nullptr);
 
   nsCOMPtr<nsIPermissionManager> permMgr =
     do_GetService(NS_PERMISSIONMANAGER_CONTRACTID);
   NS_ENSURE_TRUE(permMgr, nullptr);
 
-  PRUint32 permission = nsIPermissionManager::DENY_ACTION;
+  uint32_t permission = nsIPermissionManager::DENY_ACTION;
   permMgr->TestPermissionFromPrincipal(principal, "sms", &permission);
 
   if (permission != nsIPermissionManager::ALLOW_ACTION) {
     return nullptr;
   }
 
   nsRefPtr<SmsManager> smsMgr = new SmsManager();
   smsMgr->Init(aWindow);
--- a/toolkit/components/alerts/mac/mozNotificationCenterDelegate.h
+++ b/toolkit/components/alerts/mac/mozNotificationCenterDelegate.h
@@ -12,41 +12,41 @@
 #define COOKIE_KEY   @"ALERT_COOKIE"
 
 class nsIObserver;
 class nsIDOMWindow;
 
 @interface mozNotificationCenterDelegate : NSObject <NSUserNotificationCenterDelegate>
 {
 @private
-  PRUint32 mKey;
+  uint32_t mKey;
   NSMutableDictionary *mObserverDict;
   id<FakeNSUserNotificationCenter> mCenter;
 }
 
 /**
  * Dispatches a notification to Notification Center
  *
  * @param aTitle  The title of the notification
  * @param aText   The body of the notification
  * @param aKey    The observer key to use as a lookup (or 0 if no observer)
  * @param aCookie The string to be used as a cookie if there is an observer
  */
 - (void)notifyWithTitle:(const nsAString&)aTitle
             description:(const nsAString&)aText
-                    key:(PRUint32)aKey
+                    key:(uint32_t)aKey
                  cookie:(const nsAString&)aCookie;
 
 /**
  * Adds an nsIObserver that we can query later for dispatching obsevers.
  *
  * @param aObserver The observer we are adding.
  * @return The key it was stored in.
  */
-- (PRUint32)addObserver:(nsIObserver*)aObserver;
+- (uint32_t)addObserver:(nsIObserver*)aObserver;
 
 /**
  * Called when a window was closed and the observers are no longer valid.
  *
  * @param window The window that was closed.
  */
 - (void)forgetObserversForWindow:(nsIDOMWindow*)window;
 
--- a/toolkit/components/alerts/mac/mozNotificationCenterDelegate.mm
+++ b/toolkit/components/alerts/mac/mozNotificationCenterDelegate.mm
@@ -45,17 +45,17 @@ id<FakeNSUserNotificationCenter> GetNoti
 
   [super dealloc];
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 -(void) notifyWithTitle:(const nsAString&)aTitle
             description:(const nsAString&)aText
-                    key:(PRUint32)aKey
+                    key:(uint32_t)aKey
                  cookie:(const nsAString&)aCookie;
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   Class unClass = NSClassFromString(@"NSUserNotification");
   id<FakeNSUserNotification> notification = [[unClass alloc] init];
   notification.title = [NSString stringWithCharacters:aTitle.BeginReading()
                                                length:aTitle.Length()];
@@ -76,17 +76,17 @@ id<FakeNSUserNotificationCenter> GetNoti
   notification.soundName = NSUserNotificationDefaultSoundName;
   notification.hasActionButton = NO;
 
   [GetNotificationCenter() deliverNotification:notification];
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
-- (PRUint32) addObserver:(nsIObserver *)aObserver
+- (uint32_t) addObserver:(nsIObserver *)aObserver
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
 
   nsCOMPtr<nsIDOMWindow> parentWindow = GetWindowOfObserver(aObserver);
 
   ObserverPair* pair = [[ObserverPair alloc] initWithObserver:aObserver
                                                        window:parentWindow];