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

Unified Diff: third_party/WebKit/Source/web/ChromeClientImpl.cpp

Issue 2894693002: Add UseCounter to measure edits to text fields by security state (Closed)
Patch Set: Rebase Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/ChromeClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
index c79411f624b46d380f2a21a996ae61368df5c3d1..bd99a02304a0e02d7f39cb47b7c583ee6d183010 100644
--- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -45,6 +45,7 @@
#include "core/exported/WebViewBase.h"
#include "core/frame/FrameView.h"
#include "core/frame/Settings.h"
+#include "core/frame/UseCounter.h"
#include "core/frame/VisualViewport.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/forms/ColorChooser.h"
@@ -1136,12 +1137,15 @@ void ChromeClientImpl::HandleKeyboardEventOnTextField(
void ChromeClientImpl::DidChangeValueInTextField(
HTMLFormControlElement& element) {
- WebLocalFrameImpl* webframe =
- WebLocalFrameImpl::FromFrame(element.GetDocument().GetFrame());
+ Document& doc = element.GetDocument();
+ WebLocalFrameImpl* webframe = WebLocalFrameImpl::FromFrame(doc.GetFrame());
if (webframe->AutofillClient())
webframe->AutofillClient()->TextFieldDidChange(
WebFormControlElement(&element));
+ UseCounter::Count(doc, doc.IsSecureContext()
+ ? UseCounter::kFieldEditInSecureContext
+ : UseCounter::kFieldEditInNonSecureContext);
web_view_->PageImportanceSignals()->SetHadFormInteraction();
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698