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

Issue 4563001: Adding a privileged callback used in IE CF to check whether to show... (Closed)

Created:
10 years, 1 month ago by Jói
Modified:
9 years, 7 months ago
Reviewers:
amit, robertshield
CC:
chromium-reviews, Paweł Hajdan Jr.
Visibility:
Public.

Description

Adding a privileged callback used in IE CF to check whether to show the version mismatch warning dialog. Used this in ceee/ to only show it once per tab. Changed the logic in Firefox to show the warning dialog even when in privileged mode. This will mean it gets shown once per Firefox window. Wrote a unit test for the additional logic in ChromeFrameActivex. To write the unit test, used com_mock.py to generate a mock of the IChromeFramePrivileged interface. This can be extended to generate mocks of the other CF interfaces. Discovered duplication of np_browser_functions.h and .cc, resolved this to a single copy (the one under chrome_frame). Changed things around so chrome_tab.idl is built only once; this also lets me more easily depend on it in the com_mock rule. BUG=none TEST=chrome_frame_unittests.exe Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=65613

Patch Set 1 #

Total comments: 20

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+339 lines, -761 lines) Patch
M ceee/common/common.gyp View 1 chunk +0 lines, -2 lines 0 comments Download
D ceee/common/np_browser_functions.h View 1 chunk +0 lines, -260 lines 0 comments Download
D ceee/common/np_browser_functions.cc View 1 chunk +0 lines, -435 lines 0 comments Download
M ceee/ie/common/chrome_frame_host.h View 1 chunk +1 line, -0 lines 0 comments Download
M ceee/ie/common/chrome_frame_host.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M ceee/ie/common/common.gyp View 2 chunks +2 lines, -2 lines 0 comments Download
M ceee/ie/plugin/bho/infobar_browser_window.h View 1 chunk +1 line, -0 lines 0 comments Download
M ceee/ie/plugin/bho/infobar_browser_window.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M ceee/ie/plugin/toolband/tool_band.h View 1 chunk +1 line, -0 lines 0 comments Download
M ceee/ie/plugin/toolband/tool_band.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M ceee/ie/plugin/toolband/toolband.gyp View 1 chunk +1 line, -19 lines 0 comments Download
M ceee/testing/utils/mock_com.h View 2 chunks +8 lines, -1 line 0 comments Download
A ceee/testing/utils/mock_ioleclientsite.gen View 1 chunk +15 lines, -0 lines 0 comments Download
M ceee/testing/utils/test_utils.gyp View 1 chunk +0 lines, -1 line 0 comments Download
M chrome_frame/chrome_frame.gyp View 1 2 26 chunks +81 lines, -35 lines 0 comments Download
M chrome_frame/chrome_frame_activex.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome_frame/chrome_frame_activex.cc View 1 chunk +25 lines, -3 lines 0 comments Download
M chrome_frame/chrome_frame_npapi.cc View 1 chunk +6 lines, -2 lines 0 comments Download
M chrome_frame/chrome_tab.idl View 2 chunks +5 lines, -1 line 0 comments Download
M chrome_frame/np_browser_functions.h View 1 chunk +32 lines, -0 lines 0 comments Download
A chrome_frame/test/chrome_frame_activex_unittest.cc View 1 chunk +100 lines, -0 lines 0 comments Download
A chrome_frame/test/chrome_tab_mocks.h View 1 chunk +41 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Jói
10 years, 1 month ago (2010-11-05 02:32:57 UTC) #1
robertshield
Nice stuff, some comments below. http://codereview.chromium.org/4563001/diff/1/11 File ceee/testing/utils/mock_com.h (right): http://codereview.chromium.org/4563001/diff/1/11#newcode29 ceee/testing/utils/mock_com.h:29: #include "ceee/testing/utils/mock_ioleclientsite.gen" This is ...
10 years, 1 month ago (2010-11-05 13:45:29 UTC) #2
Jói
Thanks Robert. I'll upload a new revision later today but wanted to respond to comments ...
10 years, 1 month ago (2010-11-05 17:02:01 UTC) #3
robertshield
OK, LGTM with the addition of a TODO() to rejigger the mock generation to not ...
10 years, 1 month ago (2010-11-05 17:22:25 UTC) #4
amit
drive by... http://codereview.chromium.org/4563001/diff/1/14 File chrome_frame/chrome_frame_activex.cc (right): http://codereview.chromium.org/4563001/diff/1/14#newcode276 chrome_frame/chrome_frame_activex.cc:276: THREAD_SAFE_UMA_HISTOGRAM_COUNTS( nit: we should record UMA version ...
10 years, 1 month ago (2010-11-05 17:23:04 UTC) #5
Jói
Thanks Amit, see responses below. http://codereview.chromium.org/4563001/diff/1/14 File chrome_frame/chrome_frame_activex.cc (right): http://codereview.chromium.org/4563001/diff/1/14#newcode276 chrome_frame/chrome_frame_activex.cc:276: THREAD_SAFE_UMA_HISTOGRAM_COUNTS( On 2010/11/05 17:23:04, ...
10 years, 1 month ago (2010-11-05 17:29:51 UTC) #6
amit
On Fri, Nov 5, 2010 at 10:29 AM, <joi@chromium.org> wrote: > Thanks Amit, see responses ...
10 years, 1 month ago (2010-11-05 17:47:14 UTC) #7
robertshield
On Fri, Nov 5, 2010 at 1:47 PM, Amit Joshi <amit@chromium.org> wrote: > > > ...
10 years, 1 month ago (2010-11-05 18:02:20 UTC) #8
Jói
> I think that makes sense and essentially ShouldShowVersionMismatchDialog is > very close to OnVersionMismatch. ...
10 years, 1 month ago (2010-11-05 19:53:16 UTC) #9
amit
On Fri, Nov 5, 2010 at 12:52 PM, Jói Sigurðsson <joi@chromium.org> wrote: > > I ...
10 years, 1 month ago (2010-11-05 21:46:46 UTC) #10
Jói
OK. Do you mind if I leave the existing mechanism for determining whether to show ...
10 years, 1 month ago (2010-11-05 23:41:23 UTC) #11
amit
On Fri, Nov 5, 2010 at 4:40 PM, Jói Sigurðsson <joi@chromium.org> wrote: > OK. Do ...
10 years, 1 month ago (2010-11-05 23:50:48 UTC) #12
amit
On Fri, Nov 5, 2010 at 4:50 PM, Amit Joshi <amit@chromium.org> wrote: > > On ...
10 years, 1 month ago (2010-11-05 23:53:25 UTC) #13
Jói
LGTM The new version I uploaded adds some build-related goodness (building chrome_frame.idl once instead of ...
10 years, 1 month ago (2010-11-06 20:16:35 UTC) #14
Jói
Heh not sure why I just LGTMed my own change :-) Anyway, looks like Siggi ...
10 years, 1 month ago (2010-11-06 20:22:55 UTC) #15
Jói
Scratch that, I need a review of the new chrome_frame.gyp changes before I land, and ...
10 years, 1 month ago (2010-11-06 20:32:22 UTC) #16
robertshield
10 years, 1 month ago (2010-11-08 20:36:04 UTC) #17
chrome_frame.gyp changes LGTM

On 2010/11/06 20:32:22, Jói wrote:
> Scratch that, I need a review of the new chrome_frame.gyp changes
> before I land, and it's the weekend - will go do something less OCD :)
> 
> 2010/11/6 Jói Sigurðsson <joi@chromium.org>:
> > Heh not sure why I just LGTMed my own change :-)
> >
> > Anyway, looks like Siggi landed some stuff earlier today that I need
> > to resolve against this change, so there will be another try bot cycle
> > and then I'll commit unless I hear objections.
> >
> > Cheers,
> > Jói
> >
> >
> > On Sat, Nov 6, 2010 at 4:16 PM, mailto: <joi@chromium.org> wrote:
> >> LGTM
> >>
> >> The new version I uploaded adds some build-related goodness (building
> >> chrome_frame.idl once instead of multiple times) and passes a clobber build
> >> on
> >> the trybots, so given Amit's green light to land as is I think I'll go
ahead
> >> and
> >> do that. We can talk on Monday about how best to expose this through the
> >> public
> >> interface.
> >>
> >> Cheers,
> >> Jói
> >>
> >>
> >>
> >> http://codereview.chromium.org/4563001/diff/1/11
> >> File ceee/testing/utils/mock_com.h (right):
> >>
> >> http://codereview.chromium.org/4563001/diff/1/11#newcode29
> >> ceee/testing/utils/mock_com.h:29: #include
> >> "ceee/testing/utils/mock_ioleclientsite.gen"
> >> On 2010/11/05 17:22:26, robertshield wrote:
> >>>
> >>> On 2010/11/05 17:02:01, Jói wrote:
> >>> > On 2010/11/05 13:45:29, robertshield wrote:
> >>> > > This is cool, but since the .gen file isn't being udpated
> >>
> >> automatically,
> >>>
> >>> could
> >>> > > we just paste the generated mock method definitions here and avoid
> >>
> >> the
> >>>
> >>> inline
> >>> > > #include?
> >>> >
> >>> > We could, I'm keeping consistent with this file.
> >>> >
> >>> > I'd like to check in as-is if it's OK. I was thinking of revamping
> >>
> >> this whole
> >>>
> >>> > mock generation business, now that there is an established pattern
> >>
> >> of using
> >>>
> >>> it,
> >>> > so that the tool outputs full header files with an IFooMockImpl and
> >>
> >> a MockIFoo
> >>>
> >>> > object as per the pattern you see in this file.
> >>> >
> >>> > This file could then limit its definitions to objects that use more
> >>
> >> than one
> >>>
> >>> > MockImpl, such as MockIWebBrowser2.
> >>
> >>> Ok, the described revamp sounds like a Good Thing to me. I'm fine with
> >>
> >> this as
> >>>
> >>> is, I guess I was mainly musing :-)
> >>
> >> Logged as crbug.com/62117
> >>
> >> http://codereview.chromium.org/4563001/diff/1/13
> >> File chrome_frame/chrome_frame.gyp (right):
> >>
> >> http://codereview.chromium.org/4563001/diff/1/13#newcode97
> >> chrome_frame/chrome_frame.gyp:97:
> >> '<(SHARED_INTERMEDIATE_DIR)/mock_ichromeframeprivileged.gen',
> >> On 2010/11/05 17:22:26, robertshield wrote:
> >>>
> >>> On 2010/11/05 17:02:01, Jói wrote:
> >>> > On 2010/11/05 13:45:29, robertshield wrote:
> >>> > > why is this both a source and an output? won't that cause this
> >>
> >> action to run
> >>>
> >>> > on
> >>> > > every build whether it needs to or not?
> >>> >
> >>> > I think this may be wrong, I copied the idea from generation steps
> >>
> >> in
> >>>
> >>> > ceee/testing/utils. My sleep-deprived brain at the time told me this
> >>
> >> might be
> >>>
> >>> > weird, but I justified it in terms of "well, if anybody modifies the
> >>
> >> output
> >>>
> >>> > file, you'd want to regenerate it, right?" :-)
> >>> >
> >>> > The try bot also complained on something related to this rule so
> >>
> >> I'll take a
> >>>
> >>> > better look.
> >>
> >>> Ok, let me know what you find out, I'd be surprised if a target with
> >>
> >> the same
> >>>
> >>> source and output file was the right thing to do :-)
> >>
> >> I removed it and a clobber build on the trybots seems fine, so I will
> >> leave it out. Siggi mentioned there might have been at some point some
> >> problem with rebuilding things that depended on generated code, and that
> >> specifying as a source would work around that, but until we see such a
> >> problem I'll leave it out - that was ages ago.
> >>
> >> http://codereview.chromium.org/4563001/diff/1/13#newcode105
> >> chrome_frame/chrome_frame.gyp:105: '../ceee/testing/utils/com_mock.py',
> >> On 2010/11/05 17:22:26, robertshield wrote:
> >>>
> >>> On 2010/11/05 17:02:01, Jói wrote:
> >>> > On 2010/11/05 13:45:29, robertshield wrote:
> >>> > > Along the lines of the previous comment, scripts that are run as
> >>
> >> actions are
> >>>
> >>> > > supposed to, once they've computed their output, check it against
> >>
> >> any output
> >>>
> >>> > > file already present in the build directory.
> >>> > >
> >>> > > If the output file is already binary-identical to what would be
> >>
> >> written then
> >>>
> >>> > no
> >>> > > writes should take place to avoid triggering a rebuild of any
> >>
> >> other targets
> >>>
> >>> > that
> >>> > > depend on the output. This would require changes to com_mock.py
> >>
> >> but is
> >>>
> >>> > > definitely worth doing.
> >>> >
> >>> > I will submit that this should be a GYP feature, it would be easy to
> >>> generalize
> >>> > for any code generation steps.
> >>> >
> >>
> >>> This is true.
> >>
> >>> > That being said, I'll put a TODO in com_mock.py to fix this at the
> >>
> >> same time I
> >>>
> >>> > revamp the generation of code as mentioned in my other comment
> >>
> >> response.
> >>
> >>> sgtm.
> >>
> >> Done.
> >>
> >> http://codereview.chromium.org/4563001/show
> >>
> >
>

Powered by Google App Engine
This is Rietveld 408576698