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

Issue 1143002: Adds GeolocationContentSettings on TabContents. (Closed)

Created:
10 years, 9 months ago by bulach
Modified:
9 years, 7 months ago
CC:
chromium-reviews, jam+cc_chromium.org, brettw+cc_chromium.org, ben+cc_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr., brettw-cc_chromium.org
Visibility:
Public.

Description

Adds GeolocationContentSettings on TabContents. This data structure and the notification flow will be used to populate the location bar icon and its bubble. (this was originally part of http://codereview.chromium.org/650180) (landed by joth on http://codereview.chromium.org/1320005) TEST=geolocation_browsertest.cc

Patch Set 1 #

Total comments: 5

Patch Set 2 : Comments. #

Total comments: 2

Patch Set 3 : Adds tests for iframes. #

Total comments: 4

Patch Set 4 : Tests for tabcontents for extensions. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -30 lines) Patch
M chrome/browser/geolocation/geolocation_browsertest.cc View 1 2 15 chunks +52 lines, -20 lines 0 comments Download
M chrome/browser/geolocation/geolocation_permission_context.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/geolocation/geolocation_permission_context.cc View 1 2 3 3 chunks +16 lines, -6 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host_delegate.h View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.h View 1 5 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.cc View 1 2 3 chunks +15 lines, -0 lines 0 comments Download
M chrome/test/data/geolocation/iframes_different_origin.html View 1 chunk +6 lines, -3 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
joth
LGTM http://codereview.chromium.org/1143002/diff/1/6 File chrome/browser/tab_contents/tab_contents.cc (right): http://codereview.chromium.org/1143002/diff/1/6#newcode2039 chrome/browser/tab_contents/tab_contents.cc:2039: // TODO(bulach): rename OnBlockedContentChange to OnContentSettingsChange. The comment ...
10 years, 9 months ago (2010-03-23 11:11:11 UTC) #1
bulach
thanks Joth! peter, one question for you below, let me know your thoughts: http://codereview.chromium.org/1143002/diff/1/6 File ...
10 years, 9 months ago (2010-03-23 12:25:43 UTC) #2
brettw
Drive by style nit. http://codereview.chromium.org/1143002/diff/5001/6005 File chrome/browser/tab_contents/tab_contents.cc (right): http://codereview.chromium.org/1143002/diff/5001/6005#newcode2037 chrome/browser/tab_contents/tab_contents.cc:2037: const GURL& requesting_origin, bool allowed) ...
10 years, 9 months ago (2010-03-23 16:03:38 UTC) #3
Peter Kasting
As with the other patch I commented on, I really think you should get darin ...
10 years, 9 months ago (2010-03-23 17:46:20 UTC) #4
bulach
Peter: the question is if we should reuse the existing mechanism via "OnBlockedContentChange" to notify ...
10 years, 9 months ago (2010-03-23 18:45:18 UTC) #5
Use pkasting(at)chromium.org
On Tue, Mar 23, 2010 at 11:45 AM, <bulach@chromium.org> wrote: > Peter: the question is ...
10 years, 9 months ago (2010-03-23 19:19:21 UTC) #6
darin (slow to review)
This looks to be about implementing support for mapping a (top-frame, requesting-frame) pair to a ...
10 years, 9 months ago (2010-03-23 20:33:00 UTC) #7
Use pkasting(at)chromium.org
On Tue, Mar 23, 2010 at 1:32 PM, Darin Fisher <darin@chromium.org> wrote: > This looks ...
10 years, 9 months ago (2010-03-23 20:41:47 UTC) #8
darin (slow to review)
On 2010/03/23 20:41:47, pkasting wrote: > On Tue, Mar 23, 2010 at 1:32 PM, Darin ...
10 years, 9 months ago (2010-03-24 15:19:06 UTC) #9
bulach
thanks everyone! I just merged with another change I had, and included tests for multiple ...
10 years, 9 months ago (2010-03-24 19:21:10 UTC) #10
joth
LGTM (just read the test & html changes this time) http://codereview.chromium.org/1143002/diff/18001/19001 File chrome/browser/geolocation/geolocation_browsertest.cc (right): http://codereview.chromium.org/1143002/diff/18001/19001#newcode206 ...
10 years, 9 months ago (2010-03-24 19:32:50 UTC) #11
bulach
10 years, 9 months ago (2010-03-24 20:11:52 UTC) #12
thanks joth! clarified one comment below, will go ahead as soon as the tries are
happy.

http://codereview.chromium.org/1143002/diff/5001/6005
File chrome/browser/tab_contents/tab_contents.cc (right):

http://codereview.chromium.org/1143002/diff/5001/6005#newcode2037
chrome/browser/tab_contents/tab_contents.cc:2037: const GURL& requesting_origin,
bool allowed) {
On 2010/03/23 16:03:39, brettw wrote:
> Since the args fit, they should be put after the "(", so:
> 
> void TabContents::OnGeolocationPermissionSet(const GURL& requesting_origin,
>                                              bool allowed) {
> 
> The 4-space indent is really only for when they don't fit like this.

Done.

http://codereview.chromium.org/1143002/diff/18001/19001
File chrome/browser/geolocation/geolocation_browsertest.cc (right):

http://codereview.chromium.org/1143002/diff/18001/19001#newcode206
chrome/browser/geolocation/geolocation_browsertest.cc:206: iframe0_url_ =
iframe0.iframe_url();
On 2010/03/24 19:32:50, joth wrote:
> we _could_ do
> iframe0_url_ = IFrameLoader(current_browser_, 0).iframe_url();
> but as mika would say, that's being just a bit too cute.
> 

I'll keep as it is then..

http://codereview.chromium.org/1143002/diff/18001/19001#newcode286
chrome/browser/geolocation/geolocation_browsertest.cc:286:
EXPECT_EQ(expected_setting, content_settings[requesting_url]);
On 2010/03/24 19:32:50, joth wrote:
> calling []  has the side-effect of adding the entry if it didn't exist.
> maybe on previous line EXPECT_NE(content_setting.end(),
> content_setting.find(requesting_url));

283 already checks that:
EXPECT_EQ(1U, content_settings.count(requesting_url));

Powered by Google App Engine
This is Rietveld 408576698