Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Unreviewed, rolling out r158075.
http://trac.webkit.org/changeset/158075
https://bugs.webkit.org/show_bug.cgi?id=123389

Broke WebKit2.PrivateBrowsingPushStateNoHistoryCallback API
test (Requested by ap on #webkit).

* UIProcess/WebContext.cpp:
(WebKit::WebContext::willStartUsingPrivateBrowsing):
(WebKit::WebContext::willStopUsingPrivateBrowsing):
* UIProcess/WebContext.h:
* UIProcess/WebIconDatabase.cpp:
* UIProcess/WebIconDatabase.h:

Canonical link: https://commits.webkit.org/141489@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
webkit-commit-queue committed Oct 26, 2013
1 parent fdbb86c commit e6cf36b
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 30 deletions.
16 changes: 16 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,19 @@
2013-10-26 Commit Queue <commit-queue@webkit.org>

Unreviewed, rolling out r158075.
http://trac.webkit.org/changeset/158075
https://bugs.webkit.org/show_bug.cgi?id=123389

Broke WebKit2.PrivateBrowsingPushStateNoHistoryCallback API
test (Requested by ap on #webkit).

* UIProcess/WebContext.cpp:
(WebKit::WebContext::willStartUsingPrivateBrowsing):
(WebKit::WebContext::willStopUsingPrivateBrowsing):
* UIProcess/WebContext.h:
* UIProcess/WebIconDatabase.cpp:
* UIProcess/WebIconDatabase.h:

2013-10-26 Jae Hyun Park <jae.park@company100.net>

Remove Coordinated Graphics bits from DrawingAreaProxyImpl
Expand Down
34 changes: 13 additions & 21 deletions Source/WebKit2/UIProcess/WebContext.cpp
Expand Up @@ -428,34 +428,26 @@ void WebContext::getDatabaseProcessConnection(PassRefPtr<Messages::WebProcessPro
void WebContext::willStartUsingPrivateBrowsing()
{
const Vector<WebContext*>& contexts = allContexts();
for (size_t i = 0, count = contexts.size(); i < count; ++i)
contexts[i]->setPrivateBrowsingEnabled(true);
for (size_t i = 0, count = contexts.size(); i < count; ++i) {
#if ENABLE(NETWORK_PROCESS)
if (contexts[i]->usesNetworkProcess() && contexts[i]->networkProcess())
contexts[i]->networkProcess()->send(Messages::NetworkProcess::EnsurePrivateBrowsingSession(), 0);
#endif
contexts[i]->sendToAllProcesses(Messages::WebProcess::EnsurePrivateBrowsingSession());
}
}

void WebContext::willStopUsingPrivateBrowsing()
{
const Vector<WebContext*>& contexts = allContexts();
for (size_t i = 0, count = contexts.size(); i < count; ++i)
contexts[i]->setPrivateBrowsingEnabled(false);
}

void WebContext::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
{
m_iconDatabase->setPrivateBrowsingEnabled(privateBrowsingEnabled);

for (size_t i = 0, count = contexts.size(); i < count; ++i) {
#if ENABLE(NETWORK_PROCESS)
if (usesNetworkProcess() && networkProcess()) {
if (privateBrowsingEnabled)
networkProcess()->send(Messages::NetworkProcess::EnsurePrivateBrowsingSession(), 0);
else
networkProcess()->send(Messages::NetworkProcess::DestroyPrivateBrowsingSession(), 0);
}
#endif // ENABLED(NETWORK_PROCESS)
if (contexts[i]->usesNetworkProcess() && contexts[i]->networkProcess())
contexts[i]->networkProcess()->send(Messages::NetworkProcess::DestroyPrivateBrowsingSession(), 0);
#endif

if (privateBrowsingEnabled)
sendToAllProcesses(Messages::WebProcess::EnsurePrivateBrowsingSession());
else
sendToAllProcesses(Messages::WebProcess::DestroyPrivateBrowsingSession());
contexts[i]->sendToAllProcesses(Messages::WebProcess::DestroyPrivateBrowsingSession());
}
}

void (*s_invalidMessageCallback)(WKStringRef messageName);
Expand Down
2 changes: 0 additions & 2 deletions Source/WebKit2/UIProcess/WebContext.h
Expand Up @@ -398,8 +398,6 @@ class WebContext : public TypedAPIObject<APIObject::TypeContext>, private CoreIP
void addPlugInAutoStartOriginHash(const String& pageOrigin, unsigned plugInOriginHash);
void plugInDidReceiveUserInteraction(unsigned plugInOriginHash);

void setPrivateBrowsingEnabled(bool);

#if ENABLE(NETSCAPE_PLUGIN_API)
// PluginInfoStoreClient:
virtual void pluginInfoStoreDidLoadPlugins(PluginInfoStore*) OVERRIDE;
Expand Down
5 changes: 0 additions & 5 deletions Source/WebKit2/UIProcess/WebIconDatabase.cpp
Expand Up @@ -293,9 +293,4 @@ void WebIconDatabase::notifyIconDataReadyForPageURL(const String& pageURL)
didChangeIconForPageURL(pageURL);
}

void WebIconDatabase::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
{
m_iconDatabaseImpl->setPrivateBrowsingEnabled(privateBrowsingEnabled);
}

} // namespace WebKit
2 changes: 0 additions & 2 deletions Source/WebKit2/UIProcess/WebIconDatabase.h
Expand Up @@ -87,8 +87,6 @@ class WebIconDatabase : public TypedAPIObject<APIObject::TypeIconDatabase>, publ

void initializeIconDatabaseClient(const WKIconDatabaseClient*);

void setPrivateBrowsingEnabled(bool);

private:
WebIconDatabase(WebContext*);

Expand Down

0 comments on commit e6cf36b

Please sign in to comment.