Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Unified Diff: Source/core/dom/DOMURLUtils.cpp

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/DOMURLUtils.cpp
diff --git a/Source/core/dom/DOMURLUtils.cpp b/Source/core/dom/DOMURLUtils.cpp
index 7e1fa195c5af5d86fe00115f540654c8e164e65c..0ac6d794054b899969a583fa9b8863a2b783edd4 100644
--- a/Source/core/dom/DOMURLUtils.cpp
+++ b/Source/core/dom/DOMURLUtils.cpp
@@ -31,54 +31,54 @@
namespace WebCore {
-void DOMURLUtils::setHref(DOMURLUtils* impl, const String& value)
+void DOMURLUtils::setHref(DOMURLUtils& impl, const String& value)
{
- impl->setInput(value);
+ impl.setInput(value);
}
-void DOMURLUtils::setProtocol(DOMURLUtils* impl, const String& value)
+void DOMURLUtils::setProtocol(DOMURLUtils& impl, const String& value)
{
- KURL url = impl->url();
+ KURL url = impl.url();
if (url.isNull())
return;
url.setProtocol(value);
- impl->setURL(url);
+ impl.setURL(url);
}
-void DOMURLUtils::setUsername(DOMURLUtils* impl, const String& value)
+void DOMURLUtils::setUsername(DOMURLUtils& impl, const String& value)
{
- KURL url = impl->url();
+ KURL url = impl.url();
if (url.isNull())
return;
url.setUser(value);
- impl->setURL(url);
+ impl.setURL(url);
}
-void DOMURLUtils::setPassword(DOMURLUtils* impl, const String& value)
+void DOMURLUtils::setPassword(DOMURLUtils& impl, const String& value)
{
- KURL url = impl->url();
+ KURL url = impl.url();
if (url.isNull())
return;
url.setPass(value);
- impl->setURL(url);
+ impl.setURL(url);
}
-void DOMURLUtils::setHost(DOMURLUtils* impl, const String& value)
+void DOMURLUtils::setHost(DOMURLUtils& impl, const String& value)
{
if (value.isEmpty())
return;
- KURL url = impl->url();
+ KURL url = impl.url();
if (!url.canSetHostOrPort())
return;
url.setHostAndPort(value);
- impl->setURL(url);
+ impl.setURL(url);
}
-void DOMURLUtils::setHostname(DOMURLUtils* impl, const String& value)
+void DOMURLUtils::setHostname(DOMURLUtils& impl, const String& value)
{
- KURL url = impl->url();
+ KURL url = impl.url();
if (!url.canSetHostOrPort())
return;
@@ -94,40 +94,40 @@ void DOMURLUtils::setHostname(DOMURLUtils* impl, const String& value)
url.setHost(value.substring(i));
- impl->setURL(url);
+ impl.setURL(url);
}
-void DOMURLUtils::setPort(DOMURLUtils* impl, const String& value)
+void DOMURLUtils::setPort(DOMURLUtils& impl, const String& value)
{
- KURL url = impl->url();
+ KURL url = impl.url();
if (!url.canSetHostOrPort())
return;
url.setPort(value);
- impl->setURL(url);
+ impl.setURL(url);
}
-void DOMURLUtils::setPathname(DOMURLUtils* impl, const String& value)
+void DOMURLUtils::setPathname(DOMURLUtils& impl, const String& value)
{
- KURL url = impl->url();
+ KURL url = impl.url();
if (!url.canSetPathname())
return;
url.setPath(value);
- impl->setURL(url);
+ impl.setURL(url);
}
-void DOMURLUtils::setSearch(DOMURLUtils* impl, const String& value)
+void DOMURLUtils::setSearch(DOMURLUtils& impl, const String& value)
{
- KURL url = impl->url();
+ KURL url = impl.url();
if (!url.isValid())
return;
url.setQuery(value);
- impl->setURL(url);
+ impl.setURL(url);
}
-void DOMURLUtils::setHash(DOMURLUtils* impl, const String& value)
+void DOMURLUtils::setHash(DOMURLUtils& impl, const String& value)
{
- KURL url = impl->url();
+ KURL url = impl.url();
if (url.isNull())
return;
@@ -136,7 +136,7 @@ void DOMURLUtils::setHash(DOMURLUtils* impl, const String& value)
else
url.setFragmentIdentifier(value);
- impl->setURL(url);
+ impl.setURL(url);
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698