Commit d73f35df authored by Varun Khaneja's avatar Varun Khaneja Committed by Commit Bot

Add logging to help debug the ClusterFuzz issue.

I'm hoping that the logs here would help better understand the
reason for the linked bug. I've added a TODO to remove these log
statements once the bug is fixed.

Bug: 1104919
Change-Id: I6404463565c9480732481a645e024d56f6803805
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2336543
Commit-Queue: Varun Khaneja <vakh@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Auto-Submit: Varun Khaneja <vakh@chromium.org>
Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#794923}
parent c3ee2590
...@@ -168,6 +168,10 @@ const syncer::SyncService* GetSyncService(Profile* profile) { ...@@ -168,6 +168,10 @@ const syncer::SyncService* GetSyncService(Profile* profile) {
void AddToWidgetInputEventObservers( void AddToWidgetInputEventObservers(
content::RenderWidgetHost* widget_host, content::RenderWidgetHost* widget_host,
content::RenderWidgetHost::InputEventObserver* observer) { content::RenderWidgetHost::InputEventObserver* observer) {
// TODO(https://crbug.com/1104919): Remove this logging.
VLOG(1) << __FUNCTION__ << ": widget_host: " << widget_host
<< "; observer: " << observer;
// Since Widget API doesn't allow to check whether the observer is already // Since Widget API doesn't allow to check whether the observer is already
// added, the observer is removed and added again, to ensure that it is added // added, the observer is removed and added again, to ensure that it is added
// only once. // only once.
...@@ -183,6 +187,10 @@ void AddToWidgetInputEventObservers( ...@@ -183,6 +187,10 @@ void AddToWidgetInputEventObservers(
void RemoveFromWidgetInputEventObservers( void RemoveFromWidgetInputEventObservers(
content::RenderWidgetHost* widget_host, content::RenderWidgetHost* widget_host,
content::RenderWidgetHost::InputEventObserver* observer) { content::RenderWidgetHost::InputEventObserver* observer) {
// TODO(https://crbug.com/1104919): Remove this logging.
VLOG(1) << __FUNCTION__ << ": widget_host: " << widget_host
<< "; observer: " << observer;
if (!widget_host) if (!widget_host)
return; return;
...@@ -1198,6 +1206,10 @@ void ChromePasswordManagerClient::DidFinishNavigation( ...@@ -1198,6 +1206,10 @@ void ChromePasswordManagerClient::DidFinishNavigation(
password_reuse_detection_manager_.DidNavigateMainFrame(GetLastCommittedURL()); password_reuse_detection_manager_.DidNavigateMainFrame(GetLastCommittedURL());
#endif // defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED) #endif // defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED)
// TODO(https://crbug.com/1104919): Remove this logging.
VLOG(1) << __FUNCTION__ << ": this: " << this;
VLOG(1) << "wc: " << web_contents();
VLOG(1) << "wc->GetRenderViewHost(): " << web_contents()->GetRenderViewHost();
AddToWidgetInputEventObservers( AddToWidgetInputEventObservers(
web_contents()->GetRenderViewHost()->GetWidget(), this); web_contents()->GetRenderViewHost()->GetWidget(), this);
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
...@@ -1221,12 +1233,22 @@ void ChromePasswordManagerClient::WebContentsDestroyed() { ...@@ -1221,12 +1233,22 @@ void ChromePasswordManagerClient::WebContentsDestroyed() {
content_credential_manager_.DisconnectBinding(); content_credential_manager_.DisconnectBinding();
DCHECK(web_contents()->GetRenderViewHost()); DCHECK(web_contents()->GetRenderViewHost());
// TODO(https://crbug.com/1104919): Remove this logging.
VLOG(1) << __FUNCTION__ << ": this: " << this;
VLOG(1) << "wc: " << web_contents();
VLOG(1) << "wc->GetRenderViewHost(): " << web_contents()->GetRenderViewHost();
RemoveFromWidgetInputEventObservers( RemoveFromWidgetInputEventObservers(
web_contents()->GetRenderViewHost()->GetWidget(), this); web_contents()->GetRenderViewHost()->GetWidget(), this);
} }
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
void ChromePasswordManagerClient::OnPaste() { void ChromePasswordManagerClient::OnPaste() {
// TODO(https://crbug.com/1104919): Remove this logging.
VLOG(1) << __FUNCTION__ << ": this: " << this;
VLOG(1) << "wc: " << web_contents();
VLOG(1) << "wc->GetRenderViewHost(): " << web_contents()->GetRenderViewHost();
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
base::string16 text; base::string16 text;
clipboard->ReadText(ui::ClipboardBuffer::kCopyPaste, /* data_dst = */ nullptr, clipboard->ReadText(ui::ClipboardBuffer::kCopyPaste, /* data_dst = */ nullptr,
...@@ -1238,6 +1260,11 @@ void ChromePasswordManagerClient::OnPaste() { ...@@ -1238,6 +1260,11 @@ void ChromePasswordManagerClient::OnPaste() {
void ChromePasswordManagerClient::RenderFrameCreated( void ChromePasswordManagerClient::RenderFrameCreated(
content::RenderFrameHost* render_frame_host) { content::RenderFrameHost* render_frame_host) {
// TODO(https://crbug.com/1104919): Remove this logging.
VLOG(1) << __FUNCTION__ << ": this: " << this;
VLOG(1) << "; rfh: " << render_frame_host;
VLOG(1) << "; rfh->GetView(): " << render_frame_host->GetView();
// TODO(drubery): We should handle input events on subframes separately, so // TODO(drubery): We should handle input events on subframes separately, so
// that we can accurately report that the password was reused on a subframe. // that we can accurately report that the password was reused on a subframe.
// Currently any password reuse for this WebContents will report password // Currently any password reuse for this WebContents will report password
...@@ -1248,6 +1275,11 @@ void ChromePasswordManagerClient::RenderFrameCreated( ...@@ -1248,6 +1275,11 @@ void ChromePasswordManagerClient::RenderFrameCreated(
void ChromePasswordManagerClient::RenderFrameDeleted( void ChromePasswordManagerClient::RenderFrameDeleted(
content::RenderFrameHost* render_frame_host) { content::RenderFrameHost* render_frame_host) {
// TODO(https://crbug.com/1104919): Remove this logging.
VLOG(1) << __FUNCTION__ << ": this: " << this
<< "; rfh: " << render_frame_host
<< "; rfh->GetView(): " << render_frame_host->GetView();
if (!render_frame_host->GetView()) if (!render_frame_host->GetView())
return; return;
RemoveFromWidgetInputEventObservers( RemoveFromWidgetInputEventObservers(
......
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