Changeset 158075 in webkit
- Timestamp:
- Oct 25, 2013 5:29:17 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r158050 r158075 1 2013-10-25 Brady Eidson <beidson@apple.com> 2 3 WebIconDatabase can miss private browsing state changes. 4 <rdar://problem/15322318> and https://bugs.webkit.org/show_bug.cgi?id=123375 5 6 Reviewed by Beth Dakin. 7 8 * UIProcess/WebContext.cpp: 9 (WebKit::WebContext::willStartUsingPrivateBrowsing): Call setPrivateBrowsingEnabled(true) on each context. 10 (WebKit::WebContext::willStopUsingPrivateBrowsing): Call setPrivateBrowsingEnabled(false) on each context. 11 (WebKit::WebContext::setPrivateBrowsingEnabled): In addition to notifying other processes, notify WebIconDatabase. 12 * UIProcess/WebContext.h: 13 14 * UIProcess/WebIconDatabase.cpp: 15 (WebKit::WebIconDatabase::setPrivateBrowsingEnabled): 16 * UIProcess/WebIconDatabase.h: 17 1 18 2013-10-25 Joseph Pecoraro <pecoraro@apple.com> 2 19 -
trunk/Source/WebKit2/UIProcess/WebContext.cpp
r157850 r158075 429 429 { 430 430 const Vector<WebContext*>& contexts = allContexts(); 431 for (size_t i = 0, count = contexts.size(); i < count; ++i) { 432 #if ENABLE(NETWORK_PROCESS) 433 if (contexts[i]->usesNetworkProcess() && contexts[i]->networkProcess()) 434 contexts[i]->networkProcess()->send(Messages::NetworkProcess::EnsurePrivateBrowsingSession(), 0); 435 #endif 436 contexts[i]->sendToAllProcesses(Messages::WebProcess::EnsurePrivateBrowsingSession()); 437 } 431 for (size_t i = 0, count = contexts.size(); i < count; ++i) 432 contexts[i]->setPrivateBrowsingEnabled(true); 438 433 } 439 434 … … 441 436 { 442 437 const Vector<WebContext*>& contexts = allContexts(); 443 for (size_t i = 0, count = contexts.size(); i < count; ++i) { 444 #if ENABLE(NETWORK_PROCESS) 445 if (contexts[i]->usesNetworkProcess() && contexts[i]->networkProcess()) 446 contexts[i]->networkProcess()->send(Messages::NetworkProcess::DestroyPrivateBrowsingSession(), 0); 447 #endif 448 449 contexts[i]->sendToAllProcesses(Messages::WebProcess::DestroyPrivateBrowsingSession()); 450 } 438 for (size_t i = 0, count = contexts.size(); i < count; ++i) 439 contexts[i]->setPrivateBrowsingEnabled(false); 440 } 441 442 void WebContext::setPrivateBrowsingEnabled(bool privateBrowsingEnabled) 443 { 444 m_iconDatabase->setPrivateBrowsingEnabled(privateBrowsingEnabled); 445 446 #if ENABLE(NETWORK_PROCESS) 447 if (usesNetworkProcess() && networkProcess()) { 448 if (privateBrowsingEnabled) 449 networkProcess()->send(Messages::NetworkProcess::EnsurePrivateBrowsingSession(), 0); 450 else 451 networkProcess()->send(Messages::NetworkProcess::DestroyPrivateBrowsingSession(), 0); 452 } 453 #endif // ENABLED(NETWORK_PROCESS) 454 455 if (privateBrowsingEnabled) 456 sendToAllProcesses(Messages::WebProcess::EnsurePrivateBrowsingSession()); 457 else 458 sendToAllProcesses(Messages::WebProcess::DestroyPrivateBrowsingSession()); 451 459 } 452 460 -
trunk/Source/WebKit2/UIProcess/WebContext.h
r157524 r158075 399 399 void plugInDidReceiveUserInteraction(unsigned plugInOriginHash); 400 400 401 void setPrivateBrowsingEnabled(bool); 402 401 403 #if ENABLE(NETSCAPE_PLUGIN_API) 402 404 // PluginInfoStoreClient: -
trunk/Source/WebKit2/UIProcess/WebIconDatabase.cpp
r151932 r158075 294 294 } 295 295 296 void WebIconDatabase::setPrivateBrowsingEnabled(bool privateBrowsingEnabled) 297 { 298 m_iconDatabaseImpl->setPrivateBrowsingEnabled(privateBrowsingEnabled); 299 } 300 296 301 } // namespace WebKit -
trunk/Source/WebKit2/UIProcess/WebIconDatabase.h
r156354 r158075 88 88 void initializeIconDatabaseClient(const WKIconDatabaseClient*); 89 89 90 void setPrivateBrowsingEnabled(bool); 91 90 92 private: 91 93 WebIconDatabase(WebContext*);
Note: See TracChangeset
for help on using the changeset viewer.