0
Commit Graph

53 Commits

Author SHA1 Message Date
b948e67a9c spanification: Add #pragma allow_unsafe_buffers to component/*
See `//docs/unsafe_buffers.md`

This is a preparation to fix each files.
This CL has no behavior changes.

This patch was fully automated using script:
https://paste.googleplex.com/5614491201175552

See internal doc about it:
https://docs.google.com/document/d/1erdcokeh6rfBqs_h0drHqSLtbDbB61j7j3O2Pz8NH78/edit?resourcekey=0-hNe6w1hYAYyVXGEpWI7HVA&tab=t.0

AX-Relnotes: n/a.
Bug: 40285824
Change-Id: I24ff0aee7a6cbe6da11a08830135449ccf8f2ae2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5717711
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Cait Phillips <caitkp@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1335315}
2024-07-31 08:29:04 +00:00
b393604ea6 [buganizer] Migrate DIR_METADATA components/k-n*
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}
2024-02-08 16:44:56 +00:00
f4bcede357 Record main frame navigation metrics for non-unique hostnames
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}
2023-12-15 20:56:58 +00:00
ee1a5bd8a9 Add console message for resources with IDNA deviation chars in hostnames
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}
2022-12-15 22:17:36 +00:00
f57fe41d5d Add kill switch for IDNA navigation metrics
crrev/3988833 added a kill switch for IDNA metrics in 107. This CL
adds the same switch to later versions.

Bug: 1362507
Change-Id: I822a1a362bd99cca943882828274199530a19417
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4015045
Reviewed-by: Emily Stark <estark@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1068914}
2022-11-09 01:05:36 +00:00
aa0c934519 Safely handle other separators in IDNA2008 metrics
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}
2022-10-21 19:57:50 +00:00
fcf5cebb13 Fix a crash in navigation_metrics.cc
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}
2022-10-18 03:08:45 +00:00
07cf60097f isolated-apps: Add isolated-app scheme to navigation metrics
The new isolated-app:// scheme is used for Isolated Web Apps, which are
a new distribution mechanism for web apps that is based on Signed Web
Bundles.

Public Explainer: https://github.com/reillyeon/isolated-web-apps
Design Docs: go/isolated-apps-serving, go/isolated-app-scheme

Bug: 1334594
Change-Id: Ibe081b2bd70931aec1a9c443ccc08bdb827b5efb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3904366
Reviewed-by: Chris Thompson <cthomp@chromium.org>
Commit-Queue: Chris Thompson <cthomp@chromium.org>
Auto-Submit: Christian Flach <cmfcmf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1049189}
2022-09-20 17:25:33 +00:00
a0d0567512 [IDNA2008] Fix crash for hostnames with trailing dots
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}
2022-09-13 19:39:14 +00:00
8ba1bad80d Update copyright headers in components/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: If6a3370b0b2849d889ce797596fe1ccbad2f3fe6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3891619
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1046502}
2022-09-13 19:22:36 +00:00
342b287d86 IDNA 2008: Add UKM for deviation characters in hostnames
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}
2022-09-13 16:59:38 +00:00
a6f9563db3 Add metrics for navigations to hosts with IDNA 2008 deviation characters
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}
2022-08-26 15:22:15 +00:00
1ea3632d63 Update navigation metrics code to use defined constant instead of string.
Just a tiny change to ensure we are using the kMainFrameScheme constant
rather than a string literal.

Bug: None
Change-Id: Ic8f6f46564ed4c46e4aed38abbd0e728cbe138c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3690157
Reviewed-by: Chris Thompson <cthomp@chromium.org>
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1011129}
2022-06-06 21:22:20 +00:00
7b7aaecca4 Migrate base::{size,empty,data} to STL equivalents in //components.
Bug: 1299695
Change-Id: Ia2ef2239d649b2a50569cad9b3f293ca23510b68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3491962
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#975484}
2022-02-26 17:57:25 +00:00
479a49967a MPArch: Ensure that prerendering doesn't record engagement level
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}
2021-08-31 02:17:01 +00:00
d073f65fc0 Swap from base/stl_util.h to cxx17_backports.h in components/ .cc files.
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}
2021-05-25 17:43:06 +00:00
3204887b25 Added DIR_METADATA files to a batch of subfolders in //components/n…
also removed duplicated metadata from OWNERS files

Bug: 1113033
Change-Id: Idd6f37a1bd464d1781dda65e26c80a17f9f13349
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2568663
Commit-Queue: Norman Rosas <normando@google.com>
Commit-Queue: Ted Choc <tedchoc@chromium.org>
Auto-Submit: Norman Rosas <normando@google.com>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832882}
2020-12-02 18:23:26 +00:00
a0cb629a6d [ios][metrics] Fix conditions for RecordMainFrameNavigation call
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}
2020-06-24 17:02:34 +00:00
95340ac1a6 Reformat all gn files in /components/navigation_metrics.
`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}
2020-01-13 17:56:47 +00:00
b075c54722 OWNERS files updated with latest COMPONENT and TEAMS.
This is CL is generated by a script. Data is pulled from
review conducted in Q2 2019. See https://tinyurl.com/yxau5sc4
for context.

Bug: 977050
Change-Id: I265ac56aa1e95426b15ce94ab4d536ff4af37fad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1700881
Auto-Submit: Eric Foo <efoo@chromium.org>
Reviewed-by: Peter Williamson <petewil@chromium.org>
Reviewed-by: Emily Stark <estark@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Commit-Queue: Eric Foo <efoo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#690993}
2019-08-28 02:15:34 +00:00
251bf1d734 Replace PageLoadIncognito with Navigation.MainFrameProfileType metrics.
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}
2019-06-19 11:37:15 +00:00
bb824d0224 Move back 'PageLoad' user action to stability metrics.
'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}
2019-06-05 04:53:07 +00:00
5f48b7acc4 Add histogram to track RTL domain navigations
Change-Id: I1d76ec4fdc41d21552ec4109223be94537484ec0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1613970
Reviewed-by: Tommy Li <tommycli@chromium.org>
Reviewed-by: Emily Stark <estark@chromium.org>
Commit-Queue: Christopher Thompson <cthomp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661856}
2019-05-21 19:46:10 +00:00
28b21a67f0 DevTools: Replace the chrome-devtools:// URL scheme with a more generic
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}
2019-05-15 15:32:04 +00:00
c6a258bb5d Move PageLoad metric to navigation metrics.
'PageLoad' metric is moved from stability metrics to navigation metrics
to avoid recording ChromeOS pre-sign-in page loads.

Bug: 912346
Change-Id: Ib1d19c1ec82916da495c8cff5885152abb55822f
Reviewed-on: https://chromium-review.googlesource.com/c/1407059
Reviewed-by: Ramin Halavati <rhalavati@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@{#622808}
2019-01-15 10:59:07 +00:00
e00862d42b Move PageLoadInIncognito metrics.
'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}
2019-01-11 14:32:15 +00:00
ec65840179 Use base::size rather than arraysize in components/.
This is purely a mechanical change; there is no intended behavior change.

BUG=837308
TBR=caitkp@chromium.org

Change-Id: Icba7642ba9452eb71f6c9148cc4e5cea7dac3b4b
Reviewed-on: https://chromium-review.googlesource.com/c/1390896
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618884}
2018-12-25 21:30:14 +00:00
7314b66ccb Remove cbentzel from OWNERS
Change-Id: I1e2681b3e89e7101684acf5e4e05e6786506879d
Reviewed-on: https://chromium-review.googlesource.com/1120739
Reviewed-by: Emily Stark <estark@chromium.org>
Commit-Queue: Chris Bentzel <cbentzel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573305}
2018-07-09 14:55:11 +00:00
7a687bba8e Remove elawrence from OWNERS.
elawrence has left the team.

Bug: None
Change-Id: Ic3c31394c077a9fcf83d7e66277043bab736b285
Reviewed-on: https://chromium-review.googlesource.com/1089640
Reviewed-by: Nick Harper <nharper@chromium.org>
Reviewed-by: Eric Lawrence <elawrence@chromium.org>
Commit-Queue: Eric Lawrence <elawrence@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565178}
2018-06-07 04:23:29 +00:00
69228f4d26 [Cleanup] Update histogram_tester.h includes in //components
Update all histogram_tester.h includes in //components to include
//base/test/metrics/histogram_tester.h

TBR=jochen@chromium.org

Bug: 846421
Change-Id: Ifd2e5aca73d956dfe931e48ef55f3572244a3463
Reviewed-on: https://chromium-review.googlesource.com/1082656
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563700}
2018-06-01 17:25:10 +00:00
5427a3a3f7 Measure the schemes of alerting pages.
BUG=696454

Change-Id: I7ea839d6c9135c639b1a8a68843721142d4bf81c
Reviewed-on: https://chromium-review.googlesource.com/776123
Reviewed-by: Eric Lawrence <elawrence@chromium.org>
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517540}
2017-11-17 20:31:41 +00:00
209b73b2d5 Measure Usage of Omnibox Suggestions by Scheme
Bug: 766438
Change-Id: Ib0627398de070fb53a3239b7c8bf665071c9d8b0
Reviewed-on: https://chromium-review.googlesource.com/675678
Commit-Queue: Mark Pearson <mpearson@chromium.org>
Reviewed-by: Justin Donnelly <jdonnelly@chromium.org>
Reviewed-by: Emily Stark <estark@chromium.org>
Reviewed-by: Eric Lawrence <elawrence@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504841}
2017-09-28 00:55:11 +00:00
7c451e2143 Add missing schemes to RecordMainFrameNavigation
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}
2017-06-29 19:31:53 +00:00
e442dc593b add elawrence and estark to components/navigation_metrics/OWNERS.
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}
2017-05-09 16:57:32 +00:00
4645ee94b0 Use is_same_document term instead of is_in_page for metrics.
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}
2017-05-09 15:18:19 +00:00
16908bf6ea Add Incognito Navigation histograms
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}
2017-04-20 21:26:48 +00:00
847504d1a2 Deprecate Once-Per-Origin Navigation histograms
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}
2017-04-19 21:20:28 +00:00
0b9db8c1cc Use SameDocument term in navigation metrics unittest.
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}
2017-04-03 21:55:38 +00:00
2314fa58a0 [DirectoryOwnership] Add TEAM/COMPONENT into OWNERS files.
We are adding COMPONENT/TEAM information into OWNERS file
(domain_reliability, etc).

Proposal to add TEAM/COMPONENT information into OWNERS files
http://bit.ly/add-team-component-proposal
Proposal about how to get suggested component for directory.
http://bit.ly/directory-mapping-proposal
TEAM-COMPONENT mapping
http://bit.ly/component-team-mapping

Additional Information:
Component lists
https://bugs.chromium.org/p/chromium/adminComponents

BUG=679905
R=davidben@chromium.org

Review-Url: https://codereview.chromium.org/2740683004
Cr-Commit-Position: refs/heads/master@{#455597}
2017-03-08 23:43:32 +00:00
2fd0d88d67 Increase test coverage for Navigation.MainFrameSchemeDifferentPage
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}
2017-03-06 22:58:53 +00:00
a63dba9631 Add filesystem scheme to navigation histograms.
BUG=594215

Review-Url: https://codereview.chromium.org/2476993002
Cr-Commit-Position: refs/heads/master@{#430346}
2016-11-07 19:43:03 +00:00
f5d4ee5611 Migrate more files to histogram_macros.h from histogram.h.
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}
2016-11-07 18:59:06 +00:00
e664a26c70 Convert some component source sets to static library
This is hoping to achieve better build performance.

BUG=627637

Review-Url: https://codereview.chromium.org/2173443003
Cr-Commit-Position: refs/heads/master@{#406996}
2016-07-21 23:50:01 +00:00
54193e78c3 Componentize OriginsSeenService & provide iOS factory.
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}
2016-05-10 09:19:08 +00:00
9433e99e44 Histogram the scheme of an origin on the 1st navigation to it.
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}
2016-04-18 21:22:08 +00:00
avi
f57136c138 Switch to standard integer types in components/, part 3 of 4.
BUG=138542
TBR=blundell@chromium.org

Review URL: https://codereview.chromium.org/1551433002

Cr-Commit-Position: refs/heads/master@{#366874}
2015-12-25 23:28:47 +00:00
871c0d15c5 Add blob scheme in Navigation Histograms
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}
2015-06-10 02:51:53 +00:00
470748ce47 replace COMPILE_ASSERT with static_assert in components/
BUG=442514

Review URL: https://codereview.chromium.org/794683005

Cr-Commit-Position: refs/heads/master@{#309464}
2014-12-22 21:15:32 +00:00
68e35ca61f Add OWNERS to components/navigation_metrics
Review URL: https://codereview.chromium.org/734723003

Cr-Commit-Position: refs/heads/master@{#305169}
2014-11-21 04:52:07 +00:00
65a3dc6e61 Cleanup: Use http/https constants in components.
Review URL: https://codereview.chromium.org/726923004

Cr-Commit-Position: refs/heads/master@{#304851}
2014-11-19 18:49:58 +00:00