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

Issue 1844753002: Histogram the scheme of an origin on the 1st navigation to it. (Closed)

Created:
4 years, 8 months ago by palmer
Modified:
4 years, 7 months ago
CC:
chromium-reviews, creis+watch_chromium.org, asvitkine+watch_chromium.org, ajwong+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Histogram the scheme of an origin on the 1st navigation to it. In Off The Record and in 'normal' profiles, per session. BUG=598899 Committed: https://crrev.com/9433e99e44d9f8ded2d9562188491f0b1e234102 Cr-Commit-Position: refs/heads/master@{#388030}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Respond to comments. #

Total comments: 9

Patch Set 3 : Respond to comments; correct MFS logic. #

Patch Set 4 : Describe |HaveAlreadySeen|'s side-effect. #

Total comments: 9

Patch Set 5 : use MRUCache instead of std::set. #

Patch Set 6 : Move the origin storage from ProfileIOData to Profile. (It's RAM-only.) #

Patch Set 7 : Must #include "url/origin.h" in profile.h to use MRUCache. #

Patch Set 8 : Use an OriginsSeenService[Factory]. #

Patch Set 9 : Trim and move the Service[Factory]. #

Patch Set 10 : Remove now-extraneous `git cl format`-ism. #

Total comments: 12

Patch Set 11 : Simplifications thanks to avi. #

Total comments: 12

Patch Set 12 : Get it working in Incognito. Thanks dcheng! #

Total comments: 4

Patch Set 13 : Remove commented-out line. #

Total comments: 6

Patch Set 14 : Respond to comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -6 lines) Patch
M chrome/browser/tab_contents/navigation_metrics_recorder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +15 lines, -2 lines 0 comments Download
A chrome/browser/tab_contents/origins_seen_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/browser/tab_contents/origins_seen_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +20 lines, -0 lines 0 comments Download
A chrome/browser/tab_contents/origins_seen_service_factory.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +37 lines, -0 lines 0 comments Download
A chrome/browser/tab_contents/origins_seen_service_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +43 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M components/navigation_metrics/navigation_metrics.h View 1 1 chunk +4 lines, -1 line 0 comments Download
M components/navigation_metrics/navigation_metrics.cc View 1 2 2 chunks +17 lines, -3 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 71 (20 generated)
palmer
felt: Please see if you think this is on the right track before we bug ...
4 years, 8 months ago (2016-03-29 23:32:30 UTC) #2
felt
https://codereview.chromium.org/1844753002/diff/1/chrome/browser/tab_contents/navigation_metrics_recorder.cc File chrome/browser/tab_contents/navigation_metrics_recorder.cc (right): https://codereview.chromium.org/1844753002/diff/1/chrome/browser/tab_contents/navigation_metrics_recorder.cc#newcode42 chrome/browser/tab_contents/navigation_metrics_recorder.cc:42: bool is_otr = web_contents()->GetBrowserContext()->IsOffTheRecord(); IsOffTheRecord only returns true for ...
4 years, 8 months ago (2016-04-01 00:01:59 UTC) #3
felt
General approach seems OK, assuming privacy team blessing. For posterity: I asked Chris whether he ...
4 years, 8 months ago (2016-04-01 00:04:50 UTC) #4
palmer
New patchset coming up. https://codereview.chromium.org/1844753002/diff/1/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): https://codereview.chromium.org/1844753002/diff/1/chrome/browser/profiles/profile_io_data.cc#newcode864 chrome/browser/profiles/profile_io_data.cc:864: || profile_type() == Profile::GUEST_PROFILE; On ...
4 years, 8 months ago (2016-04-05 23:42:19 UTC) #5
felt
https://codereview.chromium.org/1844753002/diff/20001/chrome/browser/profiles/off_the_record_profile_io_data.h File chrome/browser/profiles/off_the_record_profile_io_data.h (right): https://codereview.chromium.org/1844753002/diff/20001/chrome/browser/profiles/off_the_record_profile_io_data.h#newcode17 chrome/browser/profiles/off_the_record_profile_io_data.h:17: #include "url/origin.h" still needed? https://codereview.chromium.org/1844753002/diff/20001/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): https://codereview.chromium.org/1844753002/diff/20001/chrome/browser/profiles/profile_io_data.cc#newcode868 ...
4 years, 8 months ago (2016-04-07 02:28:04 UTC) #7
palmer
https://codereview.chromium.org/1844753002/diff/20001/chrome/browser/profiles/off_the_record_profile_io_data.h File chrome/browser/profiles/off_the_record_profile_io_data.h (right): https://codereview.chromium.org/1844753002/diff/20001/chrome/browser/profiles/off_the_record_profile_io_data.h#newcode17 chrome/browser/profiles/off_the_record_profile_io_data.h:17: #include "url/origin.h" > still needed? Nope! https://codereview.chromium.org/1844753002/diff/20001/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc ...
4 years, 8 months ago (2016-04-07 23:45:43 UTC) #8
felt
https://codereview.chromium.org/1844753002/diff/20001/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): https://codereview.chromium.org/1844753002/diff/20001/chrome/browser/profiles/profile_io_data.cc#newcode868 chrome/browser/profiles/profile_io_data.cc:868: return origins_seen_.insert(origin).second == false; On 2016/04/07 23:45:43, palmer wrote: ...
4 years, 8 months ago (2016-04-07 23:51:15 UTC) #9
palmer
> I agree it makes sense to keep it a single method. I was suggesting ...
4 years, 8 months ago (2016-04-08 20:26:23 UTC) #10
palmer
PTAL, thank you! mpearson: tools/metrics cbentzel: components/navigation_metrics avi: chrome/browser/tab_contents mmenke: chrome/browser/profiles
4 years, 8 months ago (2016-04-08 20:30:40 UTC) #12
mmenke
https://codereview.chromium.org/1844753002/diff/60001/chrome/browser/profiles/profile_io_data.h File chrome/browser/profiles/profile_io_data.h (right): https://codereview.chromium.org/1844753002/diff/60001/chrome/browser/profiles/profile_io_data.h#newcode609 chrome/browser/profiles/profile_io_data.h:609: std::set<url::Origin> origins_seen_; Not a huge fan of unbounded memory ...
4 years, 8 months ago (2016-04-08 20:42:29 UTC) #13
mmenke
https://codereview.chromium.org/1844753002/diff/60001/chrome/browser/profiles/profile_io_data.h File chrome/browser/profiles/profile_io_data.h (right): https://codereview.chromium.org/1844753002/diff/60001/chrome/browser/profiles/profile_io_data.h#newcode609 chrome/browser/profiles/profile_io_data.h:609: std::set<url::Origin> origins_seen_; On 2016/04/08 20:42:29, mmenke wrote: > Not ...
4 years, 8 months ago (2016-04-08 20:45:07 UTC) #14
Mark P
histograms.xml lgtm
4 years, 8 months ago (2016-04-08 21:18:09 UTC) #15
palmer
https://codereview.chromium.org/1844753002/diff/60001/chrome/browser/profiles/profile_io_data.h File chrome/browser/profiles/profile_io_data.h (right): https://codereview.chromium.org/1844753002/diff/60001/chrome/browser/profiles/profile_io_data.h#newcode609 chrome/browser/profiles/profile_io_data.h:609: std::set<url::Origin> origins_seen_; > Not a huge fan of unbounded ...
4 years, 8 months ago (2016-04-08 21:52:02 UTC) #16
mmenke
https://codereview.chromium.org/1844753002/diff/60001/chrome/browser/profiles/profile_io_data.h File chrome/browser/profiles/profile_io_data.h (right): https://codereview.chromium.org/1844753002/diff/60001/chrome/browser/profiles/profile_io_data.h#newcode609 chrome/browser/profiles/profile_io_data.h:609: std::set<url::Origin> origins_seen_; On 2016/04/08 21:52:02, palmer wrote: > > ...
4 years, 8 months ago (2016-04-08 22:56:30 UTC) #17
palmer
> > I feel that unbounded memory concern, but it's correct for our goals. An ...
4 years, 8 months ago (2016-04-09 00:27:35 UTC) #18
cbentzel
https://codereview.chromium.org/1844753002/diff/60001/chrome/browser/profiles/profile_io_data.h File chrome/browser/profiles/profile_io_data.h (right): https://codereview.chromium.org/1844753002/diff/60001/chrome/browser/profiles/profile_io_data.h#newcode609 chrome/browser/profiles/profile_io_data.h:609: std::set<url::Origin> origins_seen_; On 2016/04/08 22:56:29, mmenke wrote: > On ...
4 years, 8 months ago (2016-04-09 23:29:15 UTC) #19
palmer
OK, here's a version that uses MRUCache, instead of set. Thoughts on the thread problem? ...
4 years, 8 months ago (2016-04-12 00:10:20 UTC) #20
mmenke
On 2016/04/12 00:10:20, palmer wrote: > OK, here's a version that uses MRUCache, instead of ...
4 years, 8 months ago (2016-04-12 14:46:43 UTC) #21
palmer
> Sorry, forgot about that part - yea, I think Profile is the way to ...
4 years, 8 months ago (2016-04-12 18:38:05 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1844753002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1844753002/100001
4 years, 8 months ago (2016-04-12 18:40:02 UTC) #24
palmer
anthonyvd: PTAl as a profiles OWNER? Thanks!
4 years, 8 months ago (2016-04-12 18:40:14 UTC) #26
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_android on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/49183)
4 years, 8 months ago (2016-04-12 19:11:31 UTC) #28
anthonyvd
+mlerman I think the accepted wisdom is that we should avoid adding more stuff to ...
4 years, 8 months ago (2016-04-12 20:29:14 UTC) #30
Mike Lerman
On 2016/04/12 20:29:14, anthonyvd wrote: > +mlerman > > I think the accepted wisdom is ...
4 years, 8 months ago (2016-04-12 20:38:43 UTC) #31
palmer
> > I think the accepted wisdom is that we should avoid adding more stuff ...
4 years, 8 months ago (2016-04-12 20:53:44 UTC) #32
Avi (use Gerrit)
On 2016/04/12 20:53:44, palmer wrote: > > > I think the accepted wisdom is that ...
4 years, 8 months ago (2016-04-12 22:45:32 UTC) #33
palmer
> He's referring to a ProfileKeyedService, which nowadays is a KeyedService with > an associated ...
4 years, 8 months ago (2016-04-13 00:49:32 UTC) #34
Mike Lerman
On 2016/04/13 00:49:32, palmer wrote: > > He's referring to a ProfileKeyedService, which nowadays is ...
4 years, 8 months ago (2016-04-13 13:03:49 UTC) #35
palmer
> Also overall, you might be able to get away with a map that lives ...
4 years, 8 months ago (2016-04-14 00:21:49 UTC) #36
palmer
avi: PTAL as chrome/browser/tab_contents/OWNERS cbentzel: components/navigation_metrics/OWNERS Thanks, all!
4 years, 8 months ago (2016-04-14 01:05:05 UTC) #38
Avi (use Gerrit)
You make this key from the Profile when you should key it off of the ...
4 years, 8 months ago (2016-04-14 02:43:26 UTC) #39
palmer
https://codereview.chromium.org/1844753002/diff/180001/chrome/browser/tab_contents/navigation_metrics_recorder.cc File chrome/browser/tab_contents/navigation_metrics_recorder.cc (right): https://codereview.chromium.org/1844753002/diff/180001/chrome/browser/tab_contents/navigation_metrics_recorder.cc#newcode48 chrome/browser/tab_contents/navigation_metrics_recorder.cc:48: OriginsSeenServiceFactory::GetForProfile(profile); On 2016/04/14 02:43:26, Avi wrote: > You shouldn't ...
4 years, 8 months ago (2016-04-14 18:47:34 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1844753002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1844753002/200001
4 years, 8 months ago (2016-04-14 18:48:47 UTC) #42
Avi (use Gerrit)
Simplify it even more! https://codereview.chromium.org/1844753002/diff/200001/chrome/browser/tab_contents/navigation_metrics_recorder.cc File chrome/browser/tab_contents/navigation_metrics_recorder.cc (right): https://codereview.chromium.org/1844753002/diff/200001/chrome/browser/tab_contents/navigation_metrics_recorder.cc#newcode10 chrome/browser/tab_contents/navigation_metrics_recorder.cc:10: #include "chrome/browser/profiles/profile.h" Do you still ...
4 years, 8 months ago (2016-04-14 19:08:02 UTC) #43
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/196964)
4 years, 8 months ago (2016-04-14 19:23:56 UTC) #45
palmer
Patchset coming up, but first I have to figure out why NavigationMetricsRecorder::DidNavigateMainFrame is getting NULL ...
4 years, 8 months ago (2016-04-14 20:13:42 UTC) #46
palmer
Yeah, OriginsSeenServiceFactory::BuildServiceInstanceFor doesn't get called in Incognito mode. It's not yet obvious to me why...
4 years, 8 months ago (2016-04-14 20:18:43 UTC) #47
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1844753002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1844753002/220001
4 years, 8 months ago (2016-04-14 23:30:30 UTC) #49
Avi (use Gerrit)
LGTM with fix. https://codereview.chromium.org/1844753002/diff/220001/chrome/browser/tab_contents/origins_seen_service_factory.cc File chrome/browser/tab_contents/origins_seen_service_factory.cc (right): https://codereview.chromium.org/1844753002/diff/220001/chrome/browser/tab_contents/origins_seen_service_factory.cc#newcode37 chrome/browser/tab_contents/origins_seen_service_factory.cc:37: // return chrome::GetBrowserContextRedirectedInIncognito(context); Remove this commented ...
4 years, 8 months ago (2016-04-15 00:47:04 UTC) #50
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-15 00:47:25 UTC) #52
palmer
https://codereview.chromium.org/1844753002/diff/220001/chrome/browser/tab_contents/origins_seen_service_factory.cc File chrome/browser/tab_contents/origins_seen_service_factory.cc (right): https://codereview.chromium.org/1844753002/diff/220001/chrome/browser/tab_contents/origins_seen_service_factory.cc#newcode37 chrome/browser/tab_contents/origins_seen_service_factory.cc:37: // return chrome::GetBrowserContextRedirectedInIncognito(context); On 2016/04/15 00:47:03, Avi wrote: > ...
4 years, 8 months ago (2016-04-15 01:07:48 UTC) #53
cbentzel
components/navigation_metrics LGTM
4 years, 8 months ago (2016-04-15 19:56:54 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1844753002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1844753002/240001
4 years, 8 months ago (2016-04-15 20:28:42 UTC) #57
palmer
battre: Can you or another privacy team person take a look? Thanks!
4 years, 8 months ago (2016-04-15 20:58:53 UTC) #60
battre
lgtm https://codereview.chromium.org/1844753002/diff/240001/chrome/browser/tab_contents/origins_seen_service.cc File chrome/browser/tab_contents/origins_seen_service.cc (right): https://codereview.chromium.org/1844753002/diff/240001/chrome/browser/tab_contents/origins_seen_service.cc#newcode7 chrome/browser/tab_contents/origins_seen_service.cc:7: #include <iostream> delete this line? https://codereview.chromium.org/1844753002/diff/240001/chrome/browser/tab_contents/origins_seen_service.h File chrome/browser/tab_contents/origins_seen_service.h ...
4 years, 8 months ago (2016-04-18 15:20:51 UTC) #61
palmer
Thank you! https://codereview.chromium.org/1844753002/diff/240001/chrome/browser/tab_contents/origins_seen_service.cc File chrome/browser/tab_contents/origins_seen_service.cc (right): https://codereview.chromium.org/1844753002/diff/240001/chrome/browser/tab_contents/origins_seen_service.cc#newcode7 chrome/browser/tab_contents/origins_seen_service.cc:7: #include <iostream> On 2016/04/18 15:20:51, battre wrote: ...
4 years, 8 months ago (2016-04-18 20:12:44 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1844753002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1844753002/260001
4 years, 8 months ago (2016-04-18 20:13:43 UTC) #65
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 8 months ago (2016-04-18 21:20:50 UTC) #67
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/9433e99e44d9f8ded2d9562188491f0b1e234102 Cr-Commit-Position: refs/heads/master@{#388030}
4 years, 8 months ago (2016-04-18 21:22:19 UTC) #69
sdefresne
On 2016/04/18 at 21:22:19, commit-bot wrote: > Patchset 14 (id:??) landed as https://crrev.com/9433e99e44d9f8ded2d9562188491f0b1e234102 > Cr-Commit-Position: ...
4 years, 8 months ago (2016-04-19 09:42:52 UTC) #70
palmer
4 years, 7 months ago (2016-04-26 23:36:13 UTC) #71
Message was sent while issue was closed.
> It looks like iOS downstream code calls RecordMainFrameNavigation.
> 
> It looks like the OriginsSeenService does not depends on anything from
//chrome
> and should be easily shareable with iOS. Do you have any plan to componentize
> this code?

I hadn't considered it. I think it would be OK, for the purposes of our
experiment, if we #ifdef'd it out for iOS. We could componentize too, I suppose.

Powered by Google App Engine
This is Rietveld 408576698