Rename AssertionState::Download.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2019 19:01:31 +0000 (19:01 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2019 19:01:31 +0000 (19:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195465

Reviewed by Andy Estes.

It's (currently) about uploads and downloads.
Let's call it "UnboundedNetworking"

* NetworkProcess/Downloads/DownloadMap.cpp:
(WebKit::DownloadMap::add):

* UIProcess/ProcessAssertion.h:

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didSetAssertionState):

* UIProcess/ios/ProcessAssertionIOS.mm:
(WebKit::flagsForState):
(WebKit::reasonForState):

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

Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/Downloads/DownloadMap.cpp
Source/WebKit/UIProcess/ProcessAssertion.h
Source/WebKit/UIProcess/WebProcessProxy.cpp
Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm

index 433b54b..8d4d7db 100644 (file)
@@ -1,3 +1,25 @@
+2019-03-08  Brady Eidson  <beidson@apple.com>
+
+        Rename AssertionState::Download.
+        https://bugs.webkit.org/show_bug.cgi?id=195465
+
+        Reviewed by Andy Estes.
+
+        It's (currently) about uploads and downloads.
+        Let's call it "UnboundedNetworking"
+
+        * NetworkProcess/Downloads/DownloadMap.cpp:
+        (WebKit::DownloadMap::add):
+
+        * UIProcess/ProcessAssertion.h:
+
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::didSetAssertionState):
+
+        * UIProcess/ios/ProcessAssertionIOS.mm:
+        (WebKit::flagsForState):
+        (WebKit::reasonForState):
+
 2019-03-08  Simon Fraser  <simon.fraser@apple.com>
 
         [macOS UI-side compositing] Mouse handling can trigger a crash before we have a scrolling tree root
index c401204..ce4eb27 100644 (file)
@@ -58,7 +58,7 @@ DownloadMap::DownloadMapType::AddResult DownloadMap::add(DownloadID downloadID,
     auto result = m_downloads.add(downloadID, WTFMove(download));
     if (m_downloads.size() == 1) {
         ASSERT(!m_downloadAssertion);
-        m_downloadAssertion = std::make_unique<ProcessAssertion>(getpid(), "WebKit downloads"_s, AssertionState::Download);
+        m_downloadAssertion = std::make_unique<ProcessAssertion>(getpid(), "WebKit downloads"_s, AssertionState::UnboundedNetworking);
     }
 
     return result;
index 15670e0..210d40a 100644 (file)
@@ -44,7 +44,7 @@ namespace WebKit {
 enum class AssertionState {
     Suspended,
     Background,
-    Download,
+    UnboundedNetworking,
     Foreground
 };
 
index 892711d..be859f9 100644 (file)
@@ -1172,7 +1172,7 @@ void WebProcessProxy::didSetAssertionState(AssertionState state)
             page->processWillBecomeForeground();
         break;
     
-    case AssertionState::Download:
+    case AssertionState::UnboundedNetworking:
         ASSERT_NOT_REACHED();
     }
 
index a73c789..5c32183 100644 (file)
@@ -139,7 +139,7 @@ static BKSProcessAssertionFlags flagsForState(AssertionState assertionState)
     case AssertionState::Suspended:
         return suspendedTabFlags;
     case AssertionState::Background:
-    case AssertionState::Download:
+    case AssertionState::UnboundedNetworking:
         return backgroundTabFlags;
     case AssertionState::Foreground:
         return foregroundTabFlags;
@@ -149,7 +149,7 @@ static BKSProcessAssertionFlags flagsForState(AssertionState assertionState)
 static BKSProcessAssertionReason reasonForState(AssertionState assertionState)
 {
     switch (assertionState) {
-    case AssertionState::Download:
+    case AssertionState::UnboundedNetworking:
         return BKSProcessAssertionReasonFinishTaskUnbounded;
     case AssertionState::Suspended:
     case AssertionState::Background: