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

Issue 8333021: Fix a crash in PageActionImageView when extensions are reloaded due to incognito settings changing. (Closed)

Created:
9 years, 2 months ago by Finnur
Modified:
9 years, 1 month ago
CC:
chromium-reviews
Visibility:
Public.

Description

Fix a crash in PageActionImageView when extensions are reloaded due to incognito settings changing. BUG=99736 TEST=Precise reproduction steps can be found in the bug description (first comment). Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=109011

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 5

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Total comments: 2

Patch Set 13 : '' #

Patch Set 14 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -18 lines) Patch
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +16 lines, -11 lines 0 comments Download
M chrome/browser/extensions/extension_service_unittest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/extensions/network_delay_listener_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/translate/translate_manager_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/location_bar/page_action_image_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +9 lines, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/page_action_image_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +21 lines, -2 lines 0 comments Download
M chrome/test/base/testing_profile.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/test/base/testing_profile.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 22 (0 generated)
Finnur
9 years, 2 months ago (2011-10-18 14:16:38 UTC) #1
Aaron Boodman
http://codereview.chromium.org/8333021/diff/4001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): http://codereview.chromium.org/8333021/diff/4001/chrome/browser/extensions/extension_service.cc#newcode2031 chrome/browser/extensions/extension_service.cc:2031: ExtensionList::iterator iter = std::find(extensions_.begin(), Can we just call ReloadExtension() ...
9 years, 2 months ago (2011-10-20 15:21:49 UTC) #2
Finnur
I guess that's a question for Matt, no (I think he wrote it)?
9 years, 2 months ago (2011-10-20 15:29:15 UTC) #3
Finnur
On 2011/10/20 15:29:15, Finnur wrote: > I guess that's a question for Matt, no (I ...
9 years, 2 months ago (2011-10-21 15:25:39 UTC) #4
Matt Perry
http://codereview.chromium.org/8333021/diff/4001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): http://codereview.chromium.org/8333021/diff/4001/chrome/browser/extensions/extension_service.cc#newcode2031 chrome/browser/extensions/extension_service.cc:2031: ExtensionList::iterator iter = std::find(extensions_.begin(), On 2011/10/20 15:21:49, Aaron Boodman ...
9 years, 2 months ago (2011-10-24 18:48:56 UTC) #5
Aaron Boodman
On Mon, Oct 24, 2011 at 11:48 AM, <mpcomplete@chromium.org> wrote: > > http://codereview.chromium.org/8333021/diff/4001/chrome/browser/extensions/extension_service.cc > File ...
9 years, 2 months ago (2011-10-24 18:50:42 UTC) #6
Finnur
Will do tomorrow. On Mon, Oct 24, 2011 at 18:50, Aaron Boodman <aa@chromium.org> wrote: > ...
9 years, 2 months ago (2011-10-24 20:28:42 UTC) #7
Finnur
Hmmm... ReloadExtension uses ExtensionProcessManager, which for a testing profile is NULL so tests like ExtensionServiceTest.ProcessSyncDataSettings ...
9 years, 2 months ago (2011-10-26 09:47:09 UTC) #8
Finnur
I'll look at this a bit more tomorrow, but in the meantime -- any bright ...
9 years, 1 month ago (2011-10-26 23:58:43 UTC) #9
Matt Perry
On 2011/10/26 23:58:43, Finnur wrote: > I'll look at this a bit more tomorrow, but ...
9 years, 1 month ago (2011-10-27 00:14:36 UTC) #10
Finnur
akalin/bolms, see question below. > I guess no unit tests exercise the SetAllowFileAccess > code ...
9 years, 1 month ago (2011-10-27 15:23:31 UTC) #11
Aaron Boodman
From my point of view, this LG. Thanks for being patient and finding a good ...
9 years, 1 month ago (2011-10-27 16:57:35 UTC) #12
Matt Perry
lgtm http://codereview.chromium.org/8333021/diff/23009/chrome/test/base/testing_profile.cc File chrome/test/base/testing_profile.cc (right): http://codereview.chromium.org/8333021/diff/23009/chrome/test/base/testing_profile.cc#newcode347 chrome/test/base/testing_profile.cc:347: extension_process_manager_.reset(ExtensionProcessManager::Create(this)); we might not want to do this ...
9 years, 1 month ago (2011-10-27 18:05:28 UTC) #13
Ben Olmstead
On 2011/10/27 15:23:31, Finnur wrote: > akalin/bolms, see question below. > > > I guess ...
9 years, 1 month ago (2011-10-27 19:59:34 UTC) #14
Finnur
What do you recommend, Ben? Re-adding these two lines? Add the On 2011/10/27 19:59:34, Ben ...
9 years, 1 month ago (2011-10-27 20:31:35 UTC) #15
Ben Olmstead
On 2011/10/27 20:31:35, Finnur wrote: > What do you recommend, Ben? Re-adding these two lines? ...
9 years, 1 month ago (2011-10-27 20:34:02 UTC) #16
akalin
http://codereview.chromium.org/8333021/diff/23009/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (left): http://codereview.chromium.org/8333021/diff/23009/chrome/browser/extensions/extension_service.cc#oldcode1951 chrome/browser/extensions/extension_service.cc:1951: SetIsIncognitoEnabled(id, extension_sync_data.incognito_enabled()); On 2011/10/27 15:23:32, Finnur wrote: > > ...
9 years, 1 month ago (2011-10-31 20:26:48 UTC) #17
Finnur
Updated the CL. Aaron: I changed the DCHECK to DCHECK_EQ. Ben: Readded the sync code. ...
9 years, 1 month ago (2011-11-02 16:26:32 UTC) #18
Matt Perry
lgtm http://codereview.chromium.org/8333021/diff/34013/chrome/browser/extensions/network_delay_listener_unittest.cc File chrome/browser/extensions/network_delay_listener_unittest.cc (right): http://codereview.chromium.org/8333021/diff/34013/chrome/browser/extensions/network_delay_listener_unittest.cc#newcode139 chrome/browser/extensions/network_delay_listener_unittest.cc:139: content::Source<Profile>(reinterpret_cast<Profile*>(profile_.get())), is the cast really necessary? TestingProfile derives ...
9 years, 1 month ago (2011-11-02 19:01:31 UTC) #19
Ben Olmstead
Restoring the sync bits lgtm.
9 years, 1 month ago (2011-11-02 19:44:23 UTC) #20
Finnur
static_cast was the first thing I tried, but it didn't work -- I don't remember ...
9 years, 1 month ago (2011-11-02 21:14:43 UTC) #21
Finnur
9 years, 1 month ago (2011-11-03 10:49:23 UTC) #22
akalin, is Ben's LG good enough for you?

http://codereview.chromium.org/8333021/diff/34013/chrome/browser/extensions/n...
File chrome/browser/extensions/network_delay_listener_unittest.cc (right):

http://codereview.chromium.org/8333021/diff/34013/chrome/browser/extensions/n...
chrome/browser/extensions/network_delay_listener_unittest.cc:139:
content::Source<Profile>(reinterpret_cast<Profile*>(profile_.get())),
Implicit casting didn't work (complained the types were unrelated) but after
digging into it some more it turned out to be due to forward decls of the
Profile class. Fixed.

On 2011/11/02 19:01:31, Matt Perry wrote:
> is the cast really necessary? TestingProfile derives from Profile so usually
the
> cast is implicit.
> 
> if you do need a cast, use static_cast, since it's a cast within a class
> hierarchy.

Powered by Google App Engine
This is Rietveld 408576698