Remove unused code in WebPageGroup
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Dec 2017 22:23:22 +0000 (22:23 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Dec 2017 22:23:22 +0000 (22:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=180604

Reviewed by Youenn Fablet.

* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::userContentController):
(WebKit::WebPageGroup::createNonNull): Deleted.
(WebKit::WebPageGroup::preferencesDidChange): Deleted.
* UIProcess/WebPageGroup.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebPageGroup.cpp
Source/WebKit/UIProcess/WebPageGroup.h
Source/WebKit/UIProcess/WebProcessPool.cpp

index cbd8cd4..5a5875a 100644 (file)
@@ -1,5 +1,20 @@
 2017-12-08  Alex Christensen  <achristensen@webkit.org>
 
 2017-12-08  Alex Christensen  <achristensen@webkit.org>
 
+        Remove unused code in WebPageGroup
+        https://bugs.webkit.org/show_bug.cgi?id=180604
+
+        Reviewed by Youenn Fablet.
+
+        * UIProcess/WebPageGroup.cpp:
+        (WebKit::WebPageGroup::userContentController):
+        (WebKit::WebPageGroup::createNonNull): Deleted.
+        (WebKit::WebPageGroup::preferencesDidChange): Deleted.
+        * UIProcess/WebPageGroup.h:
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::WebProcessPool):
+
+2017-12-08  Alex Christensen  <achristensen@webkit.org>
+
         Modernize APIWebsiteDataStore.h and WebProcessPool.h
         https://bugs.webkit.org/show_bug.cgi?id=180588
 
         Modernize APIWebsiteDataStore.h and WebProcessPool.h
         https://bugs.webkit.org/show_bug.cgi?id=180588
 
index 2cf5d59..a7a0bbc 100644 (file)
@@ -59,11 +59,6 @@ Ref<WebPageGroup> WebPageGroup::create(const String& identifier, bool visibleToI
     return adoptRef(*new WebPageGroup(identifier, visibleToInjectedBundle, visibleToHistoryClient));
 }
 
     return adoptRef(*new WebPageGroup(identifier, visibleToInjectedBundle, visibleToHistoryClient));
 }
 
-Ref<WebPageGroup> WebPageGroup::createNonNull(const String& identifier, bool visibleToInjectedBundle, bool visibleToHistoryClient)
-{
-    return adoptRef(*new WebPageGroup(identifier, visibleToInjectedBundle, visibleToHistoryClient));
-}
-
 WebPageGroup* WebPageGroup::get(uint64_t pageGroupID)
 {
     return webPageGroupMap().get(pageGroupID);
 WebPageGroup* WebPageGroup::get(uint64_t pageGroupID)
 {
     return webPageGroupMap().get(pageGroupID);
@@ -129,17 +124,9 @@ WebPreferences& WebPageGroup::preferences() const
     return *m_preferences;
 }
 
     return *m_preferences;
 }
 
-void WebPageGroup::preferencesDidChange()
-{
-    for (HashSet<WebPageProxy*>::iterator it = m_pages.begin(), end = m_pages.end(); it != end; ++it) {
-        WebPageProxy* page = *it;
-        page->preferencesDidChange();
-    }
-}
-
 WebUserContentControllerProxy& WebPageGroup::userContentController()
 {
 WebUserContentControllerProxy& WebPageGroup::userContentController()
 {
-    return *m_userContentController;
+    return m_userContentController;
 }
 
 } // namespace WebKit
 }
 
 } // namespace WebKit
index 44a9e77..960ba90 100644 (file)
@@ -23,8 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WebPageGroup_h
-#define WebPageGroup_h
+#pragma once
 
 #include "APIObject.h"
 #include "WebPageGroupData.h"
 
 #include "APIObject.h"
 #include "WebPageGroupData.h"
@@ -44,7 +43,7 @@ class WebPageGroup : public API::ObjectImpl<API::Object::Type::PageGroup> {
 public:
     WebPageGroup(const String& identifier = String(), bool visibleToInjectedBundle = true, bool visibleToHistoryClient = true);
     static Ref<WebPageGroup> create(const String& identifier = String(), bool visibleToInjectedBundle = true, bool visibleToHistoryClient = true);
 public:
     WebPageGroup(const String& identifier = String(), bool visibleToInjectedBundle = true, bool visibleToHistoryClient = true);
     static Ref<WebPageGroup> create(const String& identifier = String(), bool visibleToInjectedBundle = true, bool visibleToHistoryClient = true);
-    static Ref<WebPageGroup> createNonNull(const String& identifier = String(), bool visibleToInjectedBundle = true, bool visibleToHistoryClient = true);
+
     static WebPageGroup* get(uint64_t pageGroupID);
 
     virtual ~WebPageGroup();
     static WebPageGroup* get(uint64_t pageGroupID);
 
     virtual ~WebPageGroup();
@@ -58,17 +57,14 @@ public:
 
     void setPreferences(WebPreferences*);
     WebPreferences& preferences() const;
 
     void setPreferences(WebPreferences*);
     WebPreferences& preferences() const;
-    void preferencesDidChange();
 
     WebUserContentControllerProxy& userContentController();
 
 private:
     WebPageGroupData m_data;
     RefPtr<WebPreferences> m_preferences;
 
     WebUserContentControllerProxy& userContentController();
 
 private:
     WebPageGroupData m_data;
     RefPtr<WebPreferences> m_preferences;
-    RefPtr<WebUserContentControllerProxy> m_userContentController;
+    Ref<WebUserContentControllerProxy> m_userContentController;
     HashSet<WebPageProxy*> m_pages;
 };
 
 } // namespace WebKit
     HashSet<WebPageProxy*> m_pages;
 };
 
 } // namespace WebKit
-
-#endif // WebPageGroup_h
index 2438223..e8d5322 100644 (file)
@@ -216,7 +216,7 @@ static HashSet<String, ASCIICaseInsensitiveHash>& globalURLSchemesWithCustomProt
 
 WebProcessPool::WebProcessPool(API::ProcessPoolConfiguration& configuration)
     : m_configuration(configuration.copy())
 
 WebProcessPool::WebProcessPool(API::ProcessPoolConfiguration& configuration)
     : m_configuration(configuration.copy())
-    , m_defaultPageGroup(WebPageGroup::createNonNull())
+    , m_defaultPageGroup(WebPageGroup::create())
     , m_injectedBundleClient(std::make_unique<API::InjectedBundleClient>())
     , m_automationClient(std::make_unique<API::AutomationClient>())
     , m_downloadClient(std::make_unique<API::DownloadClient>())
     , m_injectedBundleClient(std::make_unique<API::InjectedBundleClient>())
     , m_automationClient(std::make_unique<API::AutomationClient>())
     , m_downloadClient(std::make_unique<API::DownloadClient>())