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

Issue 2457653003: Completing refactor of startup_browser_creator_impl (Closed)

Created:
4 years, 1 month ago by tmartino
Modified:
4 years, 1 month ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, Mathieu
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Completing refactor of startup_browser_creator_impl. This includes: - Reintroducing session restore logic. - Preventing Win 10 from branching on this codepath, as Win10 has been descoped from this launch. - Correcting several small but critical bugs surfaced by session restore path: - Unexpected content in Guest Mode. - NTP showing unexpectedly on restored sessions. - Pinned tabs appearing duplicated on restored sessions. BUG=660210 Committed: https://crrev.com/43f9c50bcb8b440c0f462b69f13b4bf9994e639b Cr-Commit-Position: refs/heads/master@{#429303}

Patch Set 1 #

Total comments: 19

Patch Set 2 : Addressing grt comments #

Total comments: 2

Patch Set 3 : TabsToUrls optimizations #

Total comments: 44

Patch Set 4 : Addressing pkasting comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+334 lines, -43 lines) Patch
M chrome/browser/ui/startup/startup_browser_creator_impl.h View 1 2 3 3 chunks +41 lines, -1 line 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator_impl.cc View 1 2 3 8 chunks +158 lines, -19 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator_impl_unittest.cc View 1 2 3 10 chunks +27 lines, -12 lines 0 comments Download
M chrome/browser/ui/startup/startup_tab_provider.h View 1 2 3 3 chunks +23 lines, -4 lines 0 comments Download
M chrome/browser/ui/startup/startup_tab_provider.cc View 3 chunks +32 lines, -4 lines 0 comments Download
M chrome/browser/ui/startup/startup_tab_provider_unittest.cc View 2 chunks +52 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 31 (9 generated)
tmartino
Hi Peter, This should be the grand finale of the refactor we've been working on. ...
4 years, 1 month ago (2016-10-27 23:00:44 UTC) #3
grt (UTC plus 2)
is it possible to create a unittest to cover the matrix of possibilities you covered ...
4 years, 1 month ago (2016-10-28 09:22:12 UTC) #4
tmartino
On 2016/10/28 at 09:22:12, grt wrote: > is it possible to create a unittest to ...
4 years, 1 month ago (2016-10-28 18:34:03 UTC) #5
tmartino
https://codereview.chromium.org/2457653003/diff/1/chrome/browser/ui/startup/startup_browser_creator_impl.cc File chrome/browser/ui/startup/startup_browser_creator_impl.cc (right): https://codereview.chromium.org/2457653003/diff/1/chrome/browser/ui/startup/startup_browser_creator_impl.cc#newcode624 chrome/browser/ui/startup/startup_browser_creator_impl.cc:624: if (MaybeAsyncRestore(tabs, process_startup, is_post_crash_launch)) On 2016/10/28 at 09:22:12, grt ...
4 years, 1 month ago (2016-10-28 18:34:27 UTC) #6
grt (UTC plus 2)
On 2016/10/28 18:34:03, tmartino wrote: > On 2016/10/28 at 09:22:12, grt wrote: > > is ...
4 years, 1 month ago (2016-10-28 18:43:26 UTC) #7
grt (UTC plus 2)
looks good to me, though i'll defer to PK since i was OoO during the ...
4 years, 1 month ago (2016-10-28 18:49:16 UTC) #8
tmartino
Added optimizations. Thanks for all the energy you've put into this, Greg. Browser Tests sound ...
4 years, 1 month ago (2016-10-28 19:43:20 UTC) #9
grt (UTC plus 2)
On 2016/10/28 19:43:20, tmartino wrote: > Added optimizations. Thanks for all the energy you've put ...
4 years, 1 month ago (2016-10-28 19:52:40 UTC) #10
Peter Kasting
Not going to get to this today, please harass me on IM if you haven't ...
4 years, 1 month ago (2016-10-28 23:06:44 UTC) #11
Peter Kasting
LGTM https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc File chrome/browser/ui/startup/startup_browser_creator_impl.cc (right): https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc#newcode284 chrome/browser/ui/startup/startup_browser_creator_impl.cc:284: if (base::win::GetVersion() >= base::win::VERSION_WIN10) Nit: Should there be ...
4 years, 1 month ago (2016-10-31 19:24:06 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2457653003/60001
4 years, 1 month ago (2016-11-02 16:34:00 UTC) #19
tmartino
https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc File chrome/browser/ui/startup/startup_browser_creator_impl.cc (right): https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc#newcode284 chrome/browser/ui/startup/startup_browser_creator_impl.cc:284: if (base::win::GetVersion() >= base::win::VERSION_WIN10) On 2016/10/31 at 19:24:06, Peter ...
4 years, 1 month ago (2016-11-02 16:34:00 UTC) #20
tmartino
https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc File chrome/browser/ui/startup/startup_browser_creator_impl.cc (right): https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc#newcode284 chrome/browser/ui/startup/startup_browser_creator_impl.cc:284: if (base::win::GetVersion() >= base::win::VERSION_WIN10) On 2016/10/31 at 19:24:06, Peter ...
4 years, 1 month ago (2016-11-02 16:34:00 UTC) #21
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 1 month ago (2016-11-02 16:39:21 UTC) #22
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/43f9c50bcb8b440c0f462b69f13b4bf9994e639b Cr-Commit-Position: refs/heads/master@{#429303}
4 years, 1 month ago (2016-11-02 16:51:24 UTC) #24
Peter Kasting
https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc File chrome/browser/ui/startup/startup_browser_creator_impl.cc (right): https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc#newcode750 chrome/browser/ui/startup/startup_browser_creator_impl.cc:750: // prevent a crash, use the NTP if |tabs| ...
4 years, 1 month ago (2016-11-02 17:00:46 UTC) #25
tmartino
https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc File chrome/browser/ui/startup/startup_browser_creator_impl.cc (right): https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc#newcode750 chrome/browser/ui/startup/startup_browser_creator_impl.cc:750: // prevent a crash, use the NTP if |tabs| ...
4 years, 1 month ago (2016-11-02 17:36:52 UTC) #26
grt (UTC plus 2)
https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc File chrome/browser/ui/startup/startup_browser_creator_impl.cc (right): https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc#newcode618 chrome/browser/ui/startup/startup_browser_creator_impl.cc:618: bool is_incognito_or_guest = On 2016/11/02 16:33:59, tmartino wrote: > ...
4 years, 1 month ago (2016-11-03 09:43:34 UTC) #27
tmartino
https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc File chrome/browser/ui/startup/startup_browser_creator_impl.cc (right): https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc#newcode618 chrome/browser/ui/startup/startup_browser_creator_impl.cc:618: bool is_incognito_or_guest = On 2016/11/03 at 09:43:33, grt (UTC ...
4 years, 1 month ago (2016-11-03 18:39:24 UTC) #28
tmartino
https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc File chrome/browser/ui/startup/startup_browser_creator_impl.cc (right): https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc#newcode618 chrome/browser/ui/startup/startup_browser_creator_impl.cc:618: bool is_incognito_or_guest = On 2016/11/03 at 09:43:33, grt (UTC ...
4 years, 1 month ago (2016-11-03 18:39:25 UTC) #29
Peter Kasting
https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc File chrome/browser/ui/startup/startup_browser_creator_impl.cc (right): https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/startup/startup_browser_creator_impl.cc#newcode618 chrome/browser/ui/startup/startup_browser_creator_impl.cc:618: bool is_incognito_or_guest = On 2016/11/03 18:39:24, tmartino wrote: > ...
4 years, 1 month ago (2016-11-03 21:46:42 UTC) #30
grt (UTC plus 2)
4 years, 1 month ago (2016-11-04 08:41:31 UTC) #31
Message was sent while issue was closed.
https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/start...
File chrome/browser/ui/startup/startup_browser_creator_impl.cc (right):

https://codereview.chromium.org/2457653003/diff/40001/chrome/browser/ui/start...
chrome/browser/ui/startup/startup_browser_creator_impl.cc:618: bool
is_incognito_or_guest =
On 2016/11/03 21:46:42, Peter Kasting wrote:
> On 2016/11/03 18:39:24, tmartino wrote:
> > On 2016/11/03 at 09:43:33, grt (UTC plus 1) wrote:
> > > On 2016/11/02 16:33:59, tmartino wrote:
> > > > On 2016/10/31 at 19:24:06, Peter Kasting wrote:
> > > > > Nit: Do you think it would be any clearer to reverse the sense of this
> > bool
> > > > (|is_regular_profile|) and pass that around to various places instead? 
On
> > one
> > > > hand I think "is A or B" is inherently an awkward concept to reason
about,
> > on
> > > > the other hand "regular profile" is kind of nebulous.
> > > > > 
> > > > > Maybe there's a phrase which describes the common nature of
> > incognito/guest
> > > > profiles, e.g. "is_tempory_profile" or "is_ephemeral_profile" or
> something?
> > > > 
> > > > Definitely don't like "regular", but I'm OK with "ephemeral profile".
> > > 
> > > Note that an "ephemeral profile" is a thing in and of itself
> >
>
(https://cs.chromium.org/chromium/src/chrome/browser/chromeos/profiles/profile...).
> > Please only use that term if it truly applies here.
> > 
> > Changing in forthcoming CL.
> > 
> > I see the term "off the record" being thrown around in the code; would that
be
> > an appropriate term for "incognito/guest" or does that, too, mean something
> > specific?
> 
> "off the record" is an archaic term for incognito.  It is confusingly unclear
> whether it means guest or not; I would avoid it.
> 
> (Is an incognito profile not actually an ephemeral profile, then?

I'm not sure. I had a memory of hearing about "ephemeral profiles" a year or
more ago and did a little code search.

>  I had a hard
> time telling whether it would actually count as one in the linked function,
> since it wasn't checked directly.)

Powered by Google App Engine
This is Rietveld 408576698