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

Unified Diff: third_party/WebKit/Source/modules/beacon/NavigatorBeacon.cpp

Issue 2630703002: Rename Supplement::host() to Supplement::supplementable() (Closed)
Patch Set: temp Created 3 years, 11 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: third_party/WebKit/Source/modules/beacon/NavigatorBeacon.cpp
diff --git a/third_party/WebKit/Source/modules/beacon/NavigatorBeacon.cpp b/third_party/WebKit/Source/modules/beacon/NavigatorBeacon.cpp
index 5d84c6a9d9f8bf2598773a689072718d77289049..57c952db01664bead81043bf50ec906a1dccb0ac 100644
--- a/third_party/WebKit/Source/modules/beacon/NavigatorBeacon.cpp
+++ b/third_party/WebKit/Source/modules/beacon/NavigatorBeacon.cpp
@@ -70,15 +70,15 @@ bool NavigatorBeacon::canSendBeacon(ExecutionContext* context,
}
// If detached from frame, do not allow sending a Beacon.
- if (!host()->frame())
+ if (!supplementable()->frame())
return false;
return true;
}
int NavigatorBeacon::maxAllowance() const {
- DCHECK(host()->frame());
- const Settings* settings = host()->frame()->settings();
+ DCHECK(supplementable()->frame());
+ const Settings* settings = supplementable()->frame()->settings();
if (settings) {
int maxAllowed = settings->getMaxBeaconTransmission();
if (maxAllowed < m_transmittedBytes)
@@ -118,7 +118,7 @@ bool NavigatorBeacon::sendBeaconImpl(
bool allowed;
if (data.isArrayBufferView()) {
- allowed = PingLoader::sendBeacon(host()->frame(), allowance, url,
+ allowed = PingLoader::sendBeacon(supplementable()->frame(), allowance, url,
data.getAsArrayBufferView(), bytes);
} else if (data.isBlob()) {
Blob* blob = data.getAsBlob();
@@ -134,17 +134,17 @@ bool NavigatorBeacon::sendBeaconImpl(
return false;
}
}
- allowed =
- PingLoader::sendBeacon(host()->frame(), allowance, url, blob, bytes);
+ allowed = PingLoader::sendBeacon(supplementable()->frame(), allowance, url,
+ blob, bytes);
} else if (data.isString()) {
- allowed = PingLoader::sendBeacon(host()->frame(), allowance, url,
+ allowed = PingLoader::sendBeacon(supplementable()->frame(), allowance, url,
data.getAsString(), bytes);
} else if (data.isFormData()) {
- allowed = PingLoader::sendBeacon(host()->frame(), allowance, url,
+ allowed = PingLoader::sendBeacon(supplementable()->frame(), allowance, url,
data.getAsFormData(), bytes);
} else {
- allowed = PingLoader::sendBeacon(host()->frame(), allowance, url, String(),
- bytes);
+ allowed = PingLoader::sendBeacon(supplementable()->frame(), allowance, url,
+ String(), bytes);
}
if (allowed) {

Powered by Google App Engine
This is Rietveld 408576698