Commit de6c362b authored by lukasza's avatar lukasza Committed by Commit bot

Rename documentState() to getDocumentState().

The rename is needed to avoid a naming collision after changing from
Blink to Chromium naming style.  Right now we have a |DocumentState|
type and a |documentState| accessor method (differing by case of the
first character); after a naive rename by the rewrite_to_chrome_style
tool we would end up with |DocumentState| being the name of both the
type and the accessor method (with both living in the same namespace).

Prepending a "get" prefix to the name of the accessor method is the
workaround that fits into the guidance on the recommended
post-Blink-to-Chromium-rename style suggested by esprehn@ in
https://crbug.com/582312#c17:
- Getters favor not using "Get", ex. FirstChild()
- Unless the type name conflicts, in which case you can either rename
  the type if it's easy and makes sense, or add "Get", ex. GetContext().

BUG=582312
TBR=creis@chromium.org

Review-Url: https://codereview.chromium.org/2569883002
Cr-Commit-Position: refs/heads/master@{#437995}
parent 54689895
......@@ -52,7 +52,7 @@ void GenerateFrameStateFromItem(const WebHistoryItem& item,
state->document_sequence_number =
item.documentSequenceNumber();
state->page_scale_factor = item.pageScaleFactor();
ToNullableString16Vector(item.documentState(), &state->document_state);
ToNullableString16Vector(item.getDocumentState(), &state->document_state);
state->http_body.http_content_type = item.httpContentType();
const WebHTTPBody& http_body = item.httpBody();
......
......@@ -515,7 +515,7 @@ void FrameLoader::didInstallNewDocument(bool dispatchWindowObjectAvailable) {
if (m_provisionalItem && isBackForwardLoadType(m_loadType)) {
m_frame->document()->setStateForNewFormElements(
m_provisionalItem->documentState());
m_provisionalItem->getDocumentState());
}
}
......
......@@ -118,14 +118,14 @@ void HistoryItem::setDocumentState(DocumentState* state) {
m_documentState = state;
}
const Vector<String>& HistoryItem::documentState() {
const Vector<String>& HistoryItem::getDocumentState() {
if (m_documentState)
m_documentStateVector = m_documentState->toStateVector();
return m_documentStateVector;
}
Vector<String> HistoryItem::getReferencedFilePaths() {
return FormController::getReferencedFilePaths(documentState());
return FormController::getReferencedFilePaths(getDocumentState());
}
void HistoryItem::clearDocumentState() {
......
......@@ -69,7 +69,7 @@ class CORE_EXPORT HistoryItem final
void setPageScaleFactor(float);
Vector<String> getReferencedFilePaths();
const Vector<String>& documentState();
const Vector<String>& getDocumentState();
void setDocumentState(const Vector<String>&);
void setDocumentState(DocumentState*);
void clearDocumentState();
......
......@@ -869,7 +869,7 @@ Vector<String> Internals::formControlStateOfHistoryItem(
"No history item is available.");
return Vector<String>();
}
return mainItem->documentState();
return mainItem->getDocumentState();
}
void Internals::setFormControlStateOfHistoryItem(
......
......@@ -113,8 +113,8 @@ void WebHistoryItem::setPageScaleFactor(float scale) {
m_private->setPageScaleFactor(scale);
}
WebVector<WebString> WebHistoryItem::documentState() const {
return m_private->documentState();
WebVector<WebString> WebHistoryItem::getDocumentState() const {
return m_private->getDocumentState();
}
void WebHistoryItem::setDocumentState(const WebVector<WebString>& state) {
......
......@@ -93,7 +93,7 @@ class WebHistoryItem {
BLINK_EXPORT float pageScaleFactor() const;
BLINK_EXPORT void setPageScaleFactor(float);
BLINK_EXPORT WebVector<WebString> documentState() const;
BLINK_EXPORT WebVector<WebString> getDocumentState() const;
BLINK_EXPORT void setDocumentState(const WebVector<WebString>&);
BLINK_EXPORT long long itemSequenceNumber() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment