Migrate all metadata files for components/ folders starting from k to n
and mixins used by metadata files under those folders.
Verify components with http://b/components/{id} or at
go/chrome-on-buganizer-prod-components.
Bug: chromium:1518875
Change-Id: Ie49d4768745b8f7c325d14eef1de4e4e525cdae9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5277565
Commit-Queue: Jeff Yoon <jeffyoon@google.com>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1257969}
This CL records a new histogram called
Navigation.MainFrameSchemeDifferentPage2NonUniqueHostname. This is a
subset of Navigation.MainFrameSchemeDifferentPage2 and is only recorded
when the URL is a non-unique hostname.
HTTPS Upgrades excludes non-unique hostnames but current navigation
metrics don't. So this new histogram will be useful to understand
what percentage of committed main frame navigations weren't eligible
for upgrade.
Bug: 1394910
Change-Id: I71071659aea30f129d30865801a6c5ca492eca9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5123377
Reviewed-by: David Benjamin <davidben@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Joe DeBlasio <jdeblasio@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1238249}
Chrome is planning to switch from IDNA 2008 Transitional Mode to
Non-Transitional Mode. This change will result in some hostnames
resolving to different IP addresses if the hostname contains an IDNA
deviation character. See
https://chromestatus.com/feature/5105856067141632 for details.
For example, a page containing a subresource like
<img src="http://faß.de/image.jpg"> will no longer resolve to
http://fass.de/image.jpg in Non-Transitional Mode. We want to warn
web developers in advance if they embed a resource with an affected
URL.
This CL adds a console message on pages embedding such resources if
the requestor origin is different than the resource origin (so that
we don't warn on an affected domain itself).
This is non-trivial because URL processing code presently doesn't keep deviation characters intact. As such, they aren't present in KURLs.
This means we can't simply check the hostname of the KURL for
deviation characters.
This CL adds an additional field to KURL to mark it if the original URL
string as present in the HTML of the page contains deviation characters.
It then decodes the hostname as IDNA if necessary, before printing the
log message. These URLs should be extremely rare, so this shouldn't
introduce any significant overhead; memory or performance wise.
All of this code is temporary and should be removed once
Non-Transitional IDNA is enabled in Chrome.
Bug: 694157
Change-Id: I339934bd143194e7763ec326389fde6aa764b555
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4080821
Reviewed-by: Nate Chapin <japhet@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Emily Stark <estark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1084016}
Before this CL there were still some edge cases that get canonicalized
to ".", but could cause issues with the label math used in our IDNA2008
metrics, such as "%2e". It was also possible for the outputted
non-canonicalized eTLD+1 to include extra labels and potentially result
in incorrect metrics -- this CL adds a check that the canonicalized
eTLD+1s match.
Bug: 1362507
Change-Id: I18d8688233aae47755dab9a5f170a30cea2b167b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3969490
Auto-Submit: Chris Thompson <cthomp@chromium.org>
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Commit-Queue: Chris Thompson <cthomp@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1062307}
Before this CL, Chromium might crash when the input URL includes
full width separators. Some examples like:
google.com => Good
google。com => Crash
www。google.com => Good
www。google。com => Crash
The root cause is GetEtldPlusOne16() assumes the input is always
separated with ".", causing underflow of |extra_label_count| when
non-standard separators are used. This CL fix this by replacing
non-standard separators [1] to "." before splitting labels.
[1] https://www.unicode.org/reports/tr46/#TableDerivationStep1
Bug: 1362507
Change-Id: I87d89361459e864b92aa03b428f2eb492ac23d88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3948385
Commit-Queue: Jiahe Zhang <jiahe.zhang@intel.com>
Reviewed-by: Chris Thompson <cthomp@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1060278}
When recording IDNA2008 metrics, if a hostname passed in has a trailing
dot, there could be a mismatch between the label count derived from the
canonicalized eTLD+1 and the vector of unicode hostname labels, causing
an integer underflow and a crash when erasing elements from the vector.
This change aligns the two by changing the base::StringSplit() call to
use `base::SPLIT_WANT_ALL` to keep an empty "trailing label" in these
cases.
Bug: 1362507
Change-Id: I16a15f041c03c3e3038b1c8fb9c68c1d7cea303b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3891980
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Auto-Submit: Chris Thompson <cthomp@chromium.org>
Commit-Queue: Chris Thompson <cthomp@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1046510}
This CL records a UKM for deviation characters that appear in
hostnames when the hostname is typed in the omnibox and then
navigated to. This information will be used to understand what
hostnames are affected by crbug.com/694157.
Most of this CL is plumbing code to pass the deviation character bit
from the omnibox text entry down to the navigation code. The URL
data types (GURL, Origin etc) don't keep deviation characters in the
URL, so we can't simply use the navigated URL to record this metric.
New UKM collection review doc is at
https://docs.google.com/document/d/1XKVhUe5Kes8EUfVF3LB-K9mflrE44cVL5Cnf0JrDHoM/edit
Bug: 1351768
Change-Id: Ieb3631c5c638854cfe4ed8a9ec552e6c936121cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3862865
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Dana Fried <dfried@chromium.org>
Reviewed-by: Justin Donnelly <jdonnelly@chromium.org>
Reviewed-by: Orin Jaworski <orinj@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Chris Thompson <cthomp@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1046424}
This CL adds a new histogram called Navigation.HostnameHasDeviationCharacters. This histogram records boolean value for each typed, non-reload main frame navigation. The
recorded value is true if the navigated hostname contains at least
one deviation character, such as faß.de
(https://unicode.org/reports/tr46/#Table_Deviation_Characters).
We'll use this information to understand how common it is for users
to enter hostnames with deviation characters, thus a rough indication
of the impact of a switch to Non-Transitional IDNA 2008.
Bug: 1351768
Change-Id: I06d54e215c163d61ae8f12c4dbeea3459c37ba84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3842697
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Chris Thompson <cthomp@chromium.org>
Reviewed-by: Tommy Li <tommycli@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1039794}
Almost all uses of IsInMainFrame have converted to IsInPrimaryMainFrame
for MPArch. As one of ensuring that the conversion is correct, this
CL ensures prerendering does not record engagement level in
NavigationMetricsRecorder via a new browser test.
Additionally, this CL renames RecordMainFrameNavigation methods to
RecordPrimaryMainFrameNavigation.
Bug: 1218946
Change-Id: I24e9038da3856fced24a96ad3ba8df32d28c40cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3122408
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/main@{#916648}
base::size() has been moved to base/cxx17_backports.h, so .cc files that
use base::size(), but no other function from base/stl_util.h, can
directly include base/cxx17_backports.h and not base/stl_util.h.
Bug: 1210983
Change-Id: I445378492ab1193ea76ca0c0b9958e9cb9c4ca0f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2915464
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Greg Kerr <kerrnel@chromium.org>
Commit-Queue: Greg Kerr <kerrnel@chromium.org>
Auto-Submit: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#886365}
On non-iOS platforms RecordMainFrameNavigation is called from
NavigationMetricsRecorder::DidFinishNavigation. This CL moves
RecordMainFrameNavigation call from PageLoaded callback to
DidFinishNavigation callback to match other platforms.
This CL changes the frequency of logged page load metrics on iOS,
so old histograms were marked as obsolete and suffix "2" was
added to new histograms names.
Bug: None
Change-Id: I47dc6d7051a88cb8b51957a224c4c771965a4623
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2240350
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Reviewed-by: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: Christopher Thompson <cthomp@chromium.org>
Reviewed-by: Emily Stark <estark@chromium.org>
Auto-Submit: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781918}
`gn format` recently changed its formatting behavior
for deps, source, and a few other elements when they
are assigned (with =) single-element lists to be consistent
with the formatting of updates (with +=) with single-element.
Now that we've rolled in a GN binary with the change,
reformat all files so that people don't get presubmit
warnings due to this.
This CL was uploaded by git cl split.
R=davidben@chromium.org
Bug: 1041419
Change-Id: I00ab641bf72bce17dd83302750d5ea6324af6016
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1997001
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Commit-Queue: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/master@{#730609}
Since 'PageLoad' user action is recorded in stability metrics and
'PageLoadIncognito' is recorded in navigation metrics, the two metrics
cannot be compare since the former covers partial page loads, sub-
frames, and ChromeOs pre sign-in navigation, in addition to main-frame
navigations.
To have a comparison baseline, 'PageLoadIncognito' user action is
deprecated and 'Navigation.MainFrameProfileType' histogram is added to
count guest mode, incognito, and regular page loads in the same
context.
Bug: 971023, 966747
Change-Id: I63f54dca658f8a5eb1fbd0f5f9866d4ee234c0ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1642630
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: Christopher Thompson <cthomp@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Auto-Submit: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670436}
'PageLoad' user action was moved from stability_metrics.cc to
'navigation_metrics.cc' in Ib1d19c1ec82916da495c8cff5885152abb55822f.
This had resulted in not counting unsuccessful page loads, sub frames,
and ChromeOS pre sign-in page loads.
The change is reverted.
Bug: 912346, 971023
Change-Id: Ic18b6b5c4cfc7b5bf0fd75ed132ca97b83c08c3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1642628
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: Christopher Thompson <cthomp@chromium.org>
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666169}
devtools:// scheme
This change replaces the chrome-devtools:// URL scheme, with a more
browser-agnostic equivalent.
Naturally, many files had to be touched, but it's mostly a
straightforward find/replace.
A related change is out against the catapult repo here:
https://chromium-review.googlesource.com/c/catapult/+/1606268,
which removes a test file containing the old scheme. Once it goes in,
the root DEPS file in the chromium repo needs to be updated as well.
Note:
This is a continuation of patch 1552143, but since Fabio is out on
leave and I don't have permissions to upload to his patch, I needed to
start a new one.
Bug: 960409
Change-Id: I3ede7f8d1dcbca457167eb3641ae60e9685d8d78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1582881
Commit-Queue: James Lissiak <jalissia@microsoft.com>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659944}
'PageLoadInIncognito' metrics is based on page load starts that include
pre-sign-in requests for ChromeOS.
The metrics is moved to RecordMainFrameNavigation to only record
navigations in incognito mode after ChromeOS sign-in.
Bug: 912346
Change-Id: Ifba62d9bddf67b3157ae8650cb344b9c77449803
Reviewed-on: https://chromium-review.googlesource.com/c/1404085
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Christopher Thompson <cthomp@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621999}
Previously, urls using less popular schemes were logged as "unknown"
when recording the scheme of the navigation. This change adds seven
less-popular schemes to the list of known schemes.
BUG=737581
Review-Url: https://codereview.chromium.org/2960223002
Cr-Commit-Position: refs/heads/master@{#483449}
cbentzel and I were made OWNERS here largely because it was unowned.
elawrence and estark are paying much more attention to these metrics
than me these days.
BUG=none
Review-Url: https://codereview.chromium.org/2867023003
Cr-Commit-Position: refs/heads/master@{#470355}
RecordMainFrameNavigation receives NavigationHandle->IsSameDocument()
for its second argument, so the argument name should be is_same_page.
Also updated histogram comment to be accurate.
BUG=695189
Review-Url: https://codereview.chromium.org/2849593002
Cr-Commit-Position: refs/heads/master@{#470339}
As a part of scoping changes to behavior, we want to collect the
absolute number of page navigations in Incognito mode.
BUG=712843
TEST=components_unittests --gtest_filter=NavigationMetrics*.*
Review-Url: https://codereview.chromium.org/2827983003
Cr-Commit-Position: refs/heads/master@{#466140}
As a part of scoping changes to behavior, we want to collect the absolute number of page navigations in Incognito mode instead of counting only once-per-origin. This CL deprecates the old metrics.
BUG=712843
TEST=components_unittests --gtest_filter=NavigationMetrics*.*
Review-Url: https://codereview.chromium.org/2823233003
Cr-Commit-Position: refs/heads/master@{#465752}
Old name was presumably used to match was_within_same_page IPC, but
SameDocument name better reflects the the type of the navigation
(navigation did not change the document object).
This change will make naming more consistent with the rest of Chromium
code.
BUG=695189
Review-Url: https://codereview.chromium.org/2793733002
Cr-Commit-Position: refs/heads/master@{#461549}
This CL adds tests around this metrics to make sure that it is emitted
correctly during navigation.
TEST = NavigationMetricsRecorderBrowserTest, NavigationMetrics
Review-Url: https://codereview.chromium.org/2713273002
Cr-Commit-Position: refs/heads/master@{#454988}
With this change, all files required to build chrome target
on Mac have been migrated. This CL does not yet remove the
include in base/metrics/histogram.h since files for other
targets & platforms still need migration.
BUG=416479
TBR=brettw@chromium.org
Review-Url: https://codereview.chromium.org/2479093002
Cr-Commit-Position: refs/heads/master@{#430331}
Chrome on iOS calls navigation_metrics::RecordMainFrameNavigation,
so componentize OriginsSeenService and provide an iOS factory to
share code.
BUG=604659
Review-Url: https://codereview.chromium.org/1897343003
Cr-Commit-Position: refs/heads/master@{#392572}
In Off The Record and in 'normal' profiles, per session.
BUG=598899
Review URL: https://codereview.chromium.org/1844753002
Cr-Commit-Position: refs/heads/master@{#388030}
Added 'blob' scheme in Navigation.MainFrameScheme and Navigation.MainFrameSchemeDifferentPage histograms.
Added it in the end, before the scheme_max so that scheme_max contains the number of schemes.
BUG=492773
Review URL: https://codereview.chromium.org/1167403002
Cr-Commit-Position: refs/heads/master@{#333665}