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

Issue 18967002: Small cleanup for ChromeBrowserMain: (Closed)

Created:
7 years, 5 months ago by jam
Modified:
7 years, 5 months ago
Reviewers:
Nico, oshima, petarj
CC:
chromium-reviews, tfarina, sadrul, ben+watch_chromium.org, Ben Goodger (Google), gab, Lei Zhang
Visibility:
Public.

Description

Small cleanup for ChromeBrowserMain: -add ChromeBrowserMainExtraPartsX11 to get rid of the x11 specific calls in ChromeBrowserMain that are right beside ChromeBrowserMainExtraParts calls -move win specific stuff out of ChromeBrowserMain and into ChromeBrowserMainWin -remove the static methods in chrome_browser_main.h in favor of private methods in chrome_browser_main.h -remove the unnecessary toolkit_extra_parts.h header, it doesn't help much since each method was named differently anyways R=thakis@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210884

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 3

Patch Set 4 : #

Total comments: 18
Unified diffs Side-by-side diffs Delta from patch set Stats (+200 lines, -422 lines) Patch
M chrome/browser/DEPS View 1 chunk +2 lines, -0 lines 2 comments Download
M chrome/browser/chrome_browser_main.h View 4 chunks +10 lines, -20 lines 0 comments Download
M chrome/browser/chrome_browser_main.cc View 13 chunks +63 lines, -112 lines 5 comments Download
M chrome/browser/chrome_browser_main_android.cc View 1 chunk +0 lines, -8 lines 0 comments Download
A + chrome/browser/chrome_browser_main_extra_parts_x11.h View 1 1 chunk +18 lines, -14 lines 0 comments Download
A + chrome/browser/chrome_browser_main_extra_parts_x11.cc View 2 chunks +15 lines, -27 lines 0 comments Download
M chrome/browser/chrome_browser_main_linux.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chrome_browser_main_linux.cc View 2 chunks +13 lines, -0 lines 3 comments Download
M chrome/browser/chrome_browser_main_mac.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chrome_browser_main_mac.mm View 1 2 3 4 chunks +7 lines, -16 lines 1 comment Download
M chrome/browser/chrome_browser_main_win.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/chrome_browser_main_win.cc View 3 chunks +38 lines, -13 lines 5 comments Download
D chrome/browser/chrome_browser_main_x11.h View 1 chunk +0 lines, -24 lines 0 comments Download
D chrome/browser/chrome_browser_main_x11.cc View 1 chunk +0 lines, -112 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 3 chunks +28 lines, -5 lines 2 comments Download
D chrome/browser/toolkit_extra_parts.h View 1 chunk +0 lines, -32 lines 0 comments Download
M chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc View 1 2 chunks +0 lines, -9 lines 0 comments Download
M chrome/browser/ui/gtk/chrome_browser_main_extra_parts_gtk.cc View 1 2 chunks +0 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc View 1 2 2 chunks +0 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc View 2 chunks +0 lines, -9 lines 0 comments Download
M chrome/chrome_browser.gypi View 3 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
jam
Nico: picked you randomly out of the chrome/OWNERS file so that you can look out ...
7 years, 5 months ago (2013-07-10 00:45:29 UTC) #1
tfarina
https://codereview.chromium.org/18967002/diff/14004/chrome/browser/toolkit_extra_parts.h File chrome/browser/toolkit_extra_parts.h (left): https://codereview.chromium.org/18967002/diff/14004/chrome/browser/toolkit_extra_parts.h#oldcode6 chrome/browser/toolkit_extra_parts.h:6: #define CHROME_BROWSER_TOOLKIT_EXTRA_PARTS_H_ I added this. How are you doing ...
7 years, 5 months ago (2013-07-10 00:48:37 UTC) #2
tfarina
Copying Ben (just in case), since he reviewed my toolkit_extra_parts.h changes. https://codereview.chromium.org/18967002/diff/14004/chrome/browser/DEPS File chrome/browser/DEPS (right): ...
7 years, 5 months ago (2013-07-10 00:50:50 UTC) #3
jam
https://codereview.chromium.org/18967002/diff/14004/chrome/browser/DEPS File chrome/browser/DEPS (right): https://codereview.chromium.org/18967002/diff/14004/chrome/browser/DEPS#newcode73 chrome/browser/DEPS:73: "+chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h", On 2013/07/10 00:50:50, tfarina wrote: > no, the ...
7 years, 5 months ago (2013-07-10 00:52:44 UTC) #4
tfarina
On Tue, Jul 9, 2013 at 9:52 PM, <jam@chromium.org> wrote: > > https://codereview.chromium.org/18967002/diff/14004/chrome/browser/DEPS > File ...
7 years, 5 months ago (2013-07-10 00:54:19 UTC) #5
jam
On 2013/07/10 00:54:19, tfarina wrote: > On Tue, Jul 9, 2013 at 9:52 PM, <mailto:jam@chromium.org> ...
7 years, 5 months ago (2013-07-10 00:59:52 UTC) #6
tfarina
On Tue, Jul 9, 2013 at 9:59 PM, <jam@chromium.org> wrote: I understand your point but ...
7 years, 5 months ago (2013-07-10 01:13:07 UTC) #7
jam
On 2013/07/10 01:13:07, tfarina wrote: > On Tue, Jul 9, 2013 at 9:59 PM, <mailto:jam@chromium.org> ...
7 years, 5 months ago (2013-07-10 01:19:59 UTC) #8
tfarina
On Tue, Jul 9, 2013 at 10:19 PM, <jam@chromium.org> wrote: > On 2013/07/10 01:13:07, tfarina ...
7 years, 5 months ago (2013-07-10 01:24:09 UTC) #9
jam
On 2013/07/10 01:24:09, tfarina wrote: > there is a circular dependency. browser library includes > ...
7 years, 5 months ago (2013-07-10 01:28:35 UTC) #10
tfarina
https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_content_browser_client.cc#newcode595 chrome/browser/chrome_content_browser_client.cc:595: main_parts->AddParts(new ChromeBrowserMainExtraPartsGtk()); would be possible to have a factory ...
7 years, 5 months ago (2013-07-10 01:41:14 UTC) #11
jam
https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_content_browser_client.cc#newcode595 chrome/browser/chrome_content_browser_client.cc:595: main_parts->AddParts(new ChromeBrowserMainExtraPartsGtk()); On 2013/07/10 01:41:14, tfarina wrote: > would ...
7 years, 5 months ago (2013-07-10 05:50:58 UTC) #12
Nico
The CL description is great and made reviewing this much easier, thanks. Two minor things: ...
7 years, 5 months ago (2013-07-10 17:32:50 UTC) #13
jam
On 2013/07/10 17:32:50, Nico wrote: > The CL description is great and made reviewing this ...
7 years, 5 months ago (2013-07-10 17:47:02 UTC) #14
gab
https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main_win.cc File chrome/browser/chrome_browser_main_win.cc (right): https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main_win.cc#newcode209 chrome/browser/chrome_browser_main_win.cc:209: if (do_first_run_tasks() && !profile()->IsOffTheRecord()) { On 2013/07/10 17:47:02, jam ...
7 years, 5 months ago (2013-07-10 17:48:57 UTC) #15
Nico
lgtm! https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main_linux.cc File chrome/browser/chrome_browser_main_linux.cc (right): https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main_linux.cc#newcode146 chrome/browser/chrome_browser_main_linux.cc:146: #endif (and this) https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main_mac.mm File chrome/browser/chrome_browser_main_mac.mm (right): https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main_mac.mm#newcode277 ...
7 years, 5 months ago (2013-07-10 17:50:52 UTC) #16
oshima
https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main.cc File chrome/browser/chrome_browser_main.cc (left): https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main.cc#oldcode724 chrome/browser/chrome_browser_main.cc:724: #endif On 2013/07/10 17:47:02, jam wrote: > On 2013/07/10 ...
7 years, 5 months ago (2013-07-10 18:50:37 UTC) #17
jam
On 2013/07/10 18:50:37, oshima wrote: > https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main.cc > File chrome/browser/chrome_browser_main.cc (left): > > https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main.cc#oldcode724 > ...
7 years, 5 months ago (2013-07-11 16:42:07 UTC) #18
petarj
https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main_linux.cc File chrome/browser/chrome_browser_main_linux.cc (right): https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main_linux.cc#newcode145 chrome/browser/chrome_browser_main_linux.cc:145: g_browser_process->metrics_service()->RecordBreakpadRegistration(false); You can not use g_browser_process variable here, since ...
7 years, 5 months ago (2013-07-11 23:31:04 UTC) #19
oshima
On 2013/07/11 16:42:07, jam wrote: > On 2013/07/10 18:50:37, oshima wrote: > > > https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main.cc ...
7 years, 5 months ago (2013-07-11 23:50:08 UTC) #20
jam
https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main_linux.cc File chrome/browser/chrome_browser_main_linux.cc (right): https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main_linux.cc#newcode145 chrome/browser/chrome_browser_main_linux.cc:145: g_browser_process->metrics_service()->RecordBreakpadRegistration(false); On 2013/07/11 23:31:04, petarj wrote: > You can ...
7 years, 5 months ago (2013-07-12 00:06:05 UTC) #21
Nico
7 years, 5 months ago (2013-07-12 03:41:16 UTC) #22
On Thu, Jul 11, 2013 at 4:50 PM, <oshima@chromium.org> wrote:

> On 2013/07/11 16:42:07, jam wrote:
>
>> On 2013/07/10 18:50:37, oshima wrote:
>> >
>>
>
> https://codereview.chromium.**org/18967002/diff/45002/**
>
chrome/browser/chrome_browser_**main.cc<https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main.cc>
>
>> > File chrome/browser/chrome_browser_**main.cc (left):
>> >
>> >
>>
>
> https://codereview.chromium.**org/18967002/diff/45002/**
>
chrome/browser/chrome_browser_**main.cc#oldcode724<https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_browser_main.cc#oldcode724>
>
>> > chrome/browser/chrome_browser_**main.cc:724: #endif
>> > On 2013/07/10 17:47:02, jam wrote:
>> > > On 2013/07/10 17:32:50, Nico wrote:
>> > > > I would've guessed that this is here to make sure it runs as the
>> first
>> extra
>> > > > part (and chrome_content_browser_client.**cc now adds the extra
>> x11 part
>>
> as
>
>> > last
>> > > > component). Then again, it was added in
>> > > >
https://chromiumcodereview.**appspot.com/17084014<https://chromiumcodereview....
oshima and neither
>>
> that
>
>> > CL
>> > > > description nor the current code have a comment to that end, so I
>>
> suppose
>
>> > this
>> > > > is fine, but +oshima just in case.
>> > >
>> > > I didn't see any indication that it was put here because of that. if
>> it
>> really
>> > > needs to be run before other extra parts, then we can change the order
>>
> that
>
>> > it's
>> > > added
>> >
>> > SetBrowserX11ErrorHandlersPreE**arlyInitialization should be called as
>> early
>>
> as
>
>> > possible (but less critical)
>> > and SetBrowserX11ErrorHandlersPost**MainMessageLoopStart() should be
>> called as
>> > late as possible (more critical).
>> >
>> > in which order X11 parts will be called?
>>
>
>  The X11 parts is currently the last added one, see
>>
>
> https://codereview.chromium.**org/18967002/diff/45002/**
>
chrome/browser/chrome_content_**browser_client.cc<https://codereview.chromium.org/18967002/diff/45002/chrome/browser/chrome_content_browser_client.cc>
>
> O, the order for SetBrowserX11ErrorHandlersPreE**arlyInitialization is
> less
> important, but
> SetBrowserX11ErrorHandlersPost**MainMessageLoopStart() has to be called
> after all
> initializations
> are done, so the current order is fine.
>
>
>  are you sure it needs to run before other extra parts? if so we can move
>> the
>> extra parts creation order, but i just want to know if we need to do that
>> or
>>
> not
>
>> before doing so
>>
>
>
> If we can someone guarantee/add check so that we can catch if someone
> change the
> order of the X11 parts,
> that'd be good.
>

Worst case, add a comment that this is important. (Would've been nice if
there had been a comment for this already :-) )


>
>
>
>
>
https://codereview.chromium.**org/18967002/<https://codereview.chromium.org/1...
>

Powered by Google App Engine
This is Rietveld 408576698