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

Unified Diff: third_party/WebKit/Source/core/page/EventSource.cpp

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes Created 4 years, 9 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/core/page/EventSource.cpp
diff --git a/third_party/WebKit/Source/core/page/EventSource.cpp b/third_party/WebKit/Source/core/page/EventSource.cpp
index 90a5c5d8da96eb18546d007722afde01b231b555..f194725a6bcfa21e5113c8542a3cfc78fe0aba93 100644
--- a/third_party/WebKit/Source/core/page/EventSource.cpp
+++ b/third_party/WebKit/Source/core/page/EventSource.cpp
@@ -113,9 +113,9 @@ void EventSource::connect()
{
ASSERT(m_state == CONNECTING);
ASSERT(!m_loader);
- ASSERT(executionContext());
+ ASSERT(getExecutionContext());
- ExecutionContext& executionContext = *this->executionContext();
+ ExecutionContext& executionContext = *this->getExecutionContext();
ResourceRequest request(m_url);
request.setHTTPMethod(HTTPNames::GET);
request.setHTTPHeaderField(HTTPNames::Accept, "text/event-stream");
@@ -129,7 +129,7 @@ void EventSource::connect()
request.setHTTPHeaderField(HTTPNames::Last_Event_ID, AtomicString(reinterpret_cast<const LChar*>(lastEventIdUtf8.data()), lastEventIdUtf8.length()));
}
- SecurityOrigin* origin = executionContext.securityOrigin();
+ SecurityOrigin* origin = executionContext.getSecurityOrigin();
ThreadableLoaderOptions options;
options.preflightPolicy = PreventPreflight;
@@ -150,7 +150,7 @@ void EventSource::connect()
void EventSource::networkRequestEnded()
{
- InspectorInstrumentation::didFinishEventSourceRequest(executionContext(), this);
+ InspectorInstrumentation::didFinishEventSourceRequest(getExecutionContext(), this);
m_loader = nullptr;
@@ -213,9 +213,9 @@ const AtomicString& EventSource::interfaceName() const
return EventTargetNames::EventSource;
}
-ExecutionContext* EventSource::executionContext() const
+ExecutionContext* EventSource::getExecutionContext() const
{
- return ContextLifecycleObserver::executionContext();
+ return ContextLifecycleObserver::getExecutionContext();
}
void EventSource::didReceiveResponse(unsigned long, const ResourceResponse& response, PassOwnPtr<WebDataConsumerHandle> handle)
@@ -238,7 +238,7 @@ void EventSource::didReceiveResponse(unsigned long, const ResourceResponse& resp
message.append(charset);
message.appendLiteral("\") that is not UTF-8. Aborting the connection.");
// FIXME: We are missing the source line.
- executionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message.toString()));
+ getExecutionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message.toString()));
}
} else {
// To keep the signal-to-noise ratio low, we only log 200-response with an invalid MIME type.
@@ -248,7 +248,7 @@ void EventSource::didReceiveResponse(unsigned long, const ResourceResponse& resp
message.append(response.mimeType());
message.appendLiteral("\") that is not \"text/event-stream\". Aborting the connection.");
// FIXME: We are missing the source line.
- executionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message.toString()));
+ getExecutionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message.toString()));
}
}
@@ -299,7 +299,7 @@ void EventSource::didFailAccessControlCheck(const ResourceError& error)
ASSERT(m_loader);
String message = "EventSource cannot load " + error.failingURL() + ". " + error.localizedDescription();
- executionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message));
+ getExecutionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message));
abortConnectionAttempt();
}
@@ -316,7 +316,7 @@ void EventSource::onMessageEvent(const AtomicString& eventType, const String& da
RefPtrWillBeRawPtr<MessageEvent> e = MessageEvent::create();
e->initMessageEvent(eventType, false, false, SerializedScriptValueFactory::instance().create(data), m_eventStreamOrigin, lastEventId, 0, nullptr);
- InspectorInstrumentation::willDispatchEventSourceEvent(executionContext(), this, eventType, lastEventId, data);
+ InspectorInstrumentation::willDispatchEventSourceEvent(getExecutionContext(), this, eventType, lastEventId, data);
dispatchEvent(e);
}
« no previous file with comments | « third_party/WebKit/Source/core/page/EventSource.h ('k') | third_party/WebKit/Source/core/page/NetworkStateNotifierTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698