Exemplo n.º 1
0
GURL PhoneEmailDetector::GetIntentURL(const std::string& content_text)
{
    // CAPPFIX_WEB_TRIMINTENTURL
    const unsigned strBegin = content_text.find_first_not_of(" \t\r\n");
    const unsigned strEnd = content_text.find_last_not_of(" \t\r\n");
    if (strBegin != std::string::npos && strEnd != std::string::npos) {
        const unsigned strRange = strEnd - strBegin + 1;
        if (strRange > 0)
            return GURL(m_prefix +
                    EscapeQueryParamValue(content_text.substr(strBegin, strRange), true));
    }
    // CAPPFIX_WEB_TRIMINTENTURL_END

    return GURL(m_prefix +
            EscapeQueryParamValue(content_text, true));
}
GURL PhoneEmailDetector::GetIntentURL(const std::string& content_text)
{
    return GURL(m_prefix +
            EscapeQueryParamValue(content_text, true));
}