Build fix for r105364. Unreviewed.
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2012 01:44:29 +0000 (01:44 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2012 01:44:29 +0000 (01:44 +0000)
* WebProcess/Notifications/WebNotificationManager.cpp: Wrap methods in #if ENABLE(NOTIFICATIONS)
(WebKit::WebNotificationManager::initialize):
(WebKit::WebNotificationManager::didUpdateNotificationDecision):
(WebKit::WebNotificationManager::didRemoveNotificationDecisions):
(WebKit::WebNotificationManager::policyForOrigin):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@105367 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp

index b99c91c..9820bc4 100644 (file)
@@ -1,5 +1,15 @@
 2012-01-18  Jon Lee  <jonlee@apple.com>
 
+        Build fix for r105364. Unreviewed.
+
+        * WebProcess/Notifications/WebNotificationManager.cpp: Wrap methods in #if ENABLE(NOTIFICATIONS)
+        (WebKit::WebNotificationManager::initialize):
+        (WebKit::WebNotificationManager::didUpdateNotificationDecision):
+        (WebKit::WebNotificationManager::didRemoveNotificationDecisions):
+        (WebKit::WebNotificationManager::policyForOrigin):
+
+2012-01-18  Jon Lee  <jonlee@apple.com>
+
         [WK2] Sync call for notifications permissions causes flashes on gmail.com
         https://bugs.webkit.org/show_bug.cgi?id=76570
         <rdar://problem/10647155>
index e7f0c15..0c86529 100644 (file)
@@ -68,29 +68,37 @@ void WebNotificationManager::didReceiveMessage(CoreIPC::Connection* connection,
 
 void WebNotificationManager::initialize(const HashMap<String, bool>& permissions)
 {
+#if ENABLE(NOTIFICATIONS)
     m_permissionsMap = permissions;
+#endif
 }
 
 void WebNotificationManager::didUpdateNotificationDecision(const String& originString, bool allowed)
 {
+#if ENABLE(NOTIFICATIONS)
     m_permissionsMap.set(originString, allowed);
+#endif
 }
 
 void WebNotificationManager::didRemoveNotificationDecisions(const Vector<String>& originStrings)
 {
+#if ENABLE(NOTIFICATIONS)
     size_t count = originStrings.size();
     for (size_t i = 0; i < count; ++i)
         m_permissionsMap.remove(originStrings[i]);
+#endif
 }
 
 NotificationPresenter::Permission WebNotificationManager::policyForOrigin(WebCore::SecurityOrigin *origin) const
 {
+#if ENABLE(NOTIFICATIONS)
     if (!origin)
         return NotificationPresenter::PermissionNotAllowed;
     
     HashMap<String, bool>::const_iterator it = m_permissionsMap.find(origin->toString());
     if (it != m_permissionsMap.end())
         return it->second ? NotificationPresenter::PermissionAllowed : NotificationPresenter::PermissionDenied;
+#endif
     
     return NotificationPresenter::PermissionNotAllowed;
 }