diff options
author | jongchul park <jc0204.park@samsung.com> | 2017-04-09 22:12:34 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.vlan103.tizen.org> | 2017-04-09 22:12:38 -0700 |
commit | dde47dd62c84e772456ee5e68325dd8fe9bc5934 (patch) | |
tree | 3080eb2c825e016410c9d2067d4ec4c486e55ef7 | |
parent | ad90b00afb4d268fd0549590ce7a41a5fe158308 (diff) | |
parent | a91b3585eda4a9e72a2a12a421706847e9d0f11b (diff) | |
download | browser-dde47dd62c84e772456ee5e68325dd8fe9bc5934.tar.gz browser-dde47dd62c84e772456ee5e68325dd8fe9bc5934.tar.bz2 browser-dde47dd62c84e772456ee5e68325dd8fe9bc5934.zip |
Merge "[PWE] Adding LOGs for debugging installation" into sandbox/tizen_3.0/pwa
-rwxr-xr-x | services/SimpleUI/SimpleUI.cpp | 3 | ||||
-rwxr-xr-x | services/WebEngineService/WebEngineService.cpp | 11 | ||||
-rwxr-xr-x | services/WebEngineService/WebView.cpp | 13 | ||||
-rwxr-xr-x | services/WebPageUI/WebPageUI.cpp | 2 |
4 files changed, 17 insertions, 12 deletions
diff --git a/services/SimpleUI/SimpleUI.cpp b/services/SimpleUI/SimpleUI.cpp index 8acd030..b355b13 100755 --- a/services/SimpleUI/SimpleUI.cpp +++ b/services/SimpleUI/SimpleUI.cpp @@ -318,13 +318,14 @@ void SimpleUI::countCheckUrl() #if PWE_SHUB void SimpleUI::handlePwaRequest() { - BROWSER_LOGD("[PWE-SHUB][%s:%d:%s] ", __FILE__, __LINE__, __FUNCTION__); + BROWSER_LOGD("[PWE-SHUB][%s:%d] ", __PRETTY_FUNCTION__, __LINE__); // Custom browser for PWE-SHUB - http://suprem.sec.samsung.net/jira/browse/RWASP-247 m_webEngine->handlePwaRequest(); } void SimpleUI::pwaRequestFinished() { + BROWSER_LOGD("[PWE-SHUB][%s:%d] ", __PRETTY_FUNCTION__, __LINE__); //FIXME(j-hyun.lee) - Remove this after supporting success toast message. // https://review.tizen.org/gerrit/#/c/111463 (from SRPOL browser team) tools::EflTools::createToastPopup("Added to Homescreen successfully."); diff --git a/services/WebEngineService/WebEngineService.cpp b/services/WebEngineService/WebEngineService.cpp index afa5a47..40f0127 100755 --- a/services/WebEngineService/WebEngineService.cpp +++ b/services/WebEngineService/WebEngineService.cpp @@ -485,10 +485,10 @@ bool WebEngineService::isLoading() const #if PWE_SHUB void WebEngineService::finishPWAInstallation() { - BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); + BROWSER_LOGD("[PWE-SHUB][%s:%d] ", __PRETTY_FUNCTION__, __LINE__); M_ASSERT(m_currentWebView); if (!m_currentWebView) { - BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null"); + BROWSER_LOGD("[PWE-SHUB][%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null"); return; } setPWAData(); @@ -499,7 +499,7 @@ void WebEngineService::finishPWAInstallation() void WebEngineService::registerServiceWorkerResult(const std::string& scope_url, const std::string& script_url, bool result) { - BROWSER_LOGD("[%s:%d] scope_url=%s, script_url=%s, result=%s", __PRETTY_FUNCTION__, __LINE__, + BROWSER_LOGD("[PWE-SHUB][%s:%d] scope_url=%s, script_url=%s, result=%s", __PRETTY_FUNCTION__, __LINE__, scope_url.c_str(), script_url.c_str(), result ? "true" : "false"); // Call registration regardless of service worker registration result finishPWAInstallation(); @@ -508,13 +508,14 @@ void WebEngineService::registerServiceWorkerResult(const std::string& scope_url, void WebEngineService::_register_service_worker_result_cb( Ewk_Context *, const char* scope_url, const char* script_url, Eina_Bool result, void* data) { + BROWSER_LOGD("[PWE-SHUB][%s:%d] ", __PRETTY_FUNCTION__, __LINE__); auto self = static_cast<WebEngineService*>(data); self->registerServiceWorkerResult(scope_url, script_url, result); } void WebEngineService::registerServiceWorker(const std::string& scope_url, const std::string& script_url) { - BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); + BROWSER_LOGD("[PWE-SHUB][%s:%d] ", __PRETTY_FUNCTION__, __LINE__); ewk_context_service_worker_register( m_currentWebView->getContext(), scope_url.c_str(), script_url.c_str(), _register_service_worker_result_cb, this); @@ -522,7 +523,7 @@ void WebEngineService::registerServiceWorker(const std::string& scope_url, const void WebEngineService::handlePwaRequest() { - BROWSER_LOGD("[PWE-SHUB][%s:%d:%s] ", __FILE__, __LINE__, __FUNCTION__); + BROWSER_LOGD("[PWE-SHUB][%s:%d] ", __PRETTY_FUNCTION__, __LINE__); M_ASSERT(m_currentWebView); if (!m_currentWebView || !m_currentWebView->hasInstallPWAFragment()) { return; diff --git a/services/WebEngineService/WebView.cpp b/services/WebEngineService/WebView.cpp index 7128a27..d5adb8c 100755 --- a/services/WebEngineService/WebView.cpp +++ b/services/WebEngineService/WebView.cpp @@ -393,6 +393,7 @@ void WebView::requestManifest(void) BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); #if PWE_SHUB if (!m_pwaManifestURI.empty()) { + BROWSER_LOGD("[PWE-SHUB][%s:%d] ewk_view_request_manifest_from_url()", __PRETTY_FUNCTION__, __LINE__); ewk_view_request_manifest_from_url(m_ewkView, __setManifestData, this, getURI().c_str(), m_pwaManifestURI.c_str()); m_pwaManifestURI.clear(); @@ -641,19 +642,19 @@ bool WebView::isLoadError() const #if PWE_SHUB bool WebView::hasInstallPWAFragment() { - BROWSER_LOGD("[PWE-SHUB][%s:%d:%s] m_hasInstallPWAFragment: %d", __FILE__, __LINE__, __FUNCTION__, m_hasInstallPWAFragment); + BROWSER_LOGD("[PWE-SHUB][%s:%d] m_hasInstallPWAFragment: %d", __PRETTY_FUNCTION__, __LINE__, m_hasInstallPWAFragment); return m_hasInstallPWAFragment; } void WebView::setInstallPWAFragment(const bool& state) { - BROWSER_LOGD("[PWE-SHUB][%s:%d:%s] set m_hasInstallPWAFragment: %d", __FILE__, __LINE__, __FUNCTION__, state); + BROWSER_LOGD("[PWE-SHUB][%s:%d] set m_hasInstallPWAFragment: %d", __PRETTY_FUNCTION__, __LINE__, state); m_hasInstallPWAFragment = state; } const std::string& WebView::getPWAServiceWorkerUri() const { - BROWSER_LOGD("[PWE-SHUB][%s:%d:%s]", __FILE__, __LINE__, __FUNCTION__); + BROWSER_LOGD("[PWE-SHUB][%s:%d]", __PRETTY_FUNCTION__, __LINE__); return m_pwaServiceWorkerURI; } @@ -1778,20 +1779,22 @@ void WebView::__policy_navigation_decide_cb(void *data, Evas_Object * /*obj*/, v #if PWE_SHUB auto hash_pwa_install_pos = wv->m_loadingURL.rfind(HASH_PWA_INSTALL); if (hash_pwa_install_pos != std::string::npos) { - BROWSER_LOGD("[PWE-SHUB][%s:%d:%s] PWA Installation Trigger is detacted: %s", - __FILE__, __LINE__, __FUNCTION__, uri); + BROWSER_LOGD("[PWE-SHUB][::%d] PWA Installation Trigger is detacted: %s", __LINE__, uri); auto manifest_uri_pos = wv->m_loadingURL.find( '#', hash_pwa_install_pos + HASH_PWA_INSTALL.length()); if (manifest_uri_pos != std::string::npos) { auto sw_uri_pos = wv->m_loadingURL.find('#', manifest_uri_pos + 1); if (sw_uri_pos != std::string::npos) { wv->m_pwaManifestURI = wv->m_loadingURL.substr(manifest_uri_pos, sw_uri_pos); + BROWSER_LOGD("[PWE-SHUB][::%d] Manifest URI : %s", __LINE__, wv->m_pwaManifestURI.c_str()); wv->m_pwaServiceWorkerURI = wv->m_loadingURL.substr(sw_uri_pos); + BROWSER_LOGD("[PWE-SHUB][::%d] ServiceWorker URI : %s", __LINE__, wv->m_pwaServiceWorkerURI.c_str()); } } wv->setInstallPWAFragment(true); ewk_policy_decision_ignore(policy_decision); auto filtered_uri = wv->m_loadingURL.substr(0, hash_pwa_install_pos); + BROWSER_LOGD("[PWE-SHUB][::%d] setURI to filtered URI: %s", __LINE__, filtered_uri.c_str()); wv->setURI(filtered_uri); return; } diff --git a/services/WebPageUI/WebPageUI.cpp b/services/WebPageUI/WebPageUI.cpp index a88d54b..b3e21b5 100755 --- a/services/WebPageUI/WebPageUI.cpp +++ b/services/WebPageUI/WebPageUI.cpp @@ -221,7 +221,7 @@ void WebPageUI::loadFinished() #if PWE_SHUB // FIXME(j-hyun.lee): // We temporarily have blocked installing with access count(banner) for avoiding confusion. - BROWSER_LOGD("[PWE-SHUB][%s:%d:%s] We temporarily have blocked installing with access count(banner).", __FILE__, __LINE__, __FUNCTION__); + BROWSER_LOGD("[PWE-SHUB][%s:%d] We temporarily have blocked installing with access count(banner).", __PRETTY_FUNCTION__, __LINE__); handlePwaRequestSignal(); #else getCountCheckSignal(); |