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

Issue 2241203003: Pass user session type to extension feature checks (Closed)

Created:
4 years, 4 months ago by tbarzic
Modified:
4 years, 3 months ago
Reviewers:
rkc, xiyuan, Devlin, meacer
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, darin (slow to review), extensions-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Pass user session type to extension feature checks This is part of logic needed for adding an extension feature parameter that makes the feature available depending on session type (i.e. whether if current user is kiosk app). The issue fixed here is determining the current session type, against which a feature availability should be checked. Feature availability checks are run both in browser and renderer process, but session type is known only by browser. This means it has to be passed to the renderer in order for feature availability to be correctly determined. This CL accomplishes that by sending the session type is to the renderer by browser process as part of the renderer process start-up ( together with channel info, in ExtensionMsg_SetSessionInfo message). BUG=606417 Committed: https://crrev.com/c34cf3c996bf1f088086690c93e61e00f0b640dd Cr-Commit-Position: refs/heads/master@{#417686}

Patch Set 1 #

Patch Set 2 : Add session type to simple extension features #

Patch Set 3 : rebase #

Patch Set 4 : Add session type to simple extension features #

Patch Set 5 : Add session type to simple extension features #

Patch Set 6 : Add session type to simple extension features #

Patch Set 7 : Add session type to simple extension features #

Patch Set 8 : split out some stuff #

Total comments: 6

Patch Set 9 : . #

Patch Set 10 : . #

Patch Set 11 : . #

Total comments: 4

Patch Set 12 : Pass user session type to extension renderer #

Patch Set 13 : Pass user session type to extension renderer #

Total comments: 14

Patch Set 14 : Pass user session type to extension renderer #

Patch Set 15 : Pass user session type to extension renderer #

Total comments: 4

Patch Set 16 : nits #

Total comments: 10

Patch Set 17 : . #

Total comments: 4

Patch Set 18 : . #

Total comments: 2

Patch Set 19 : Pass user session type to extension renderer #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -9 lines) Patch
M chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +20 lines, -0 lines 0 comments Download
M extensions/browser/renderer_startup_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -3 lines 0 comments Download
M extensions/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/common/extension_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +8 lines, -3 lines 0 comments Download
A extensions/common/features/feature_session_type.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +45 lines, -0 lines 0 comments Download
A extensions/common/features/feature_session_type.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +39 lines, -0 lines 0 comments Download
M extensions/renderer/dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -1 line 0 comments Download
M extensions/renderer/dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +5 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 67 (45 generated)
tbarzic
meacer for the new IPC message (extensions/common/extension_messages.h)
4 years, 4 months ago (2016-08-16 22:41:55 UTC) #21
tbarzic
On 2016/08/16 22:41:55, tbarzic wrote: > meacer for the new IPC message (extensions/common/extension_messages.h) On rkc's ...
4 years, 4 months ago (2016-08-17 00:23:19 UTC) #25
Devlin
On 2016/08/17 00:23:19, tbarzic wrote: > On 2016/08/16 22:41:55, tbarzic wrote: > > meacer for ...
4 years, 4 months ago (2016-08-17 16:47:49 UTC) #30
Devlin
Couple of high-level comments that should simplify the CL significantly. https://codereview.chromium.org/2241203003/diff/140001/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc File chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc (right): https://codereview.chromium.org/2241203003/diff/140001/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc#newcode563 ...
4 years, 4 months ago (2016-08-17 17:07:36 UTC) #31
tbarzic
https://codereview.chromium.org/2241203003/diff/140001/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc File chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc (right): https://codereview.chromium.org/2241203003/diff/140001/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc#newcode563 chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc:563: extensions::util::GetCurrentSessionType())); On 2016/08/17 at 17:07:35, Devlin wrote: > This ...
4 years, 4 months ago (2016-08-17 19:49:02 UTC) #35
rkc
https://codereview.chromium.org/2241203003/diff/200001/extensions/browser/renderer_startup_helper.cc File extensions/browser/renderer_startup_helper.cc (right): https://codereview.chromium.org/2241203003/diff/200001/extensions/browser/renderer_startup_helper.cc#newcode80 extensions/browser/renderer_startup_helper.cc:80: extensions::util::GetCurrentSessionType())); This can be GetCurrentFeatureSessionType() instead. https://codereview.chromium.org/2241203003/diff/200001/extensions/common/features/feature_session_type.h File extensions/common/features/feature_session_type.h ...
4 years, 4 months ago (2016-08-17 23:07:24 UTC) #36
tbarzic
+xiyuan Also, updated dependent cl https://codereview.chromium.org/2241203003/diff/200001/extensions/browser/renderer_startup_helper.cc File extensions/browser/renderer_startup_helper.cc (right): https://codereview.chromium.org/2241203003/diff/200001/extensions/browser/renderer_startup_helper.cc#newcode80 extensions/browser/renderer_startup_helper.cc:80: extensions::util::GetCurrentSessionType())); On 2016/08/17 at ...
4 years, 4 months ago (2016-08-18 01:05:33 UTC) #38
Devlin
muuuuch better, love <200 loc CLs! :) https://codereview.chromium.org/2241203003/diff/240001/chrome/browser/extensions/chrome_extensions_browser_client.cc File chrome/browser/extensions/chrome_extensions_browser_client.cc (right): https://codereview.chromium.org/2241203003/diff/240001/chrome/browser/extensions/chrome_extensions_browser_client.cc#newcode84 chrome/browser/extensions/chrome_extensions_browser_client.cc:84: return FEATURE_SESSION_TYPE_REGULAR; ...
4 years, 4 months ago (2016-08-18 17:19:15 UTC) #39
tbarzic
I realized that previous cl did not update session type when the log in state ...
4 years, 4 months ago (2016-08-18 18:58:10 UTC) #41
rkc
lgtm https://codereview.chromium.org/2241203003/diff/280001/extensions/common/features/feature_session_type.h File extensions/common/features/feature_session_type.h (right): https://codereview.chromium.org/2241203003/diff/280001/extensions/common/features/feature_session_type.h#newcode27 extensions/common/features/feature_session_type.h:27: MAX = KIOSK nit: s/MAX/LAST
4 years, 4 months ago (2016-08-18 20:35:10 UTC) #46
meacer
IPC Lgtm
4 years, 4 months ago (2016-08-18 20:49:28 UTC) #47
xiyuan
lgtm https://codereview.chromium.org/2241203003/diff/280001/extensions/common/features/feature_session_type.h File extensions/common/features/feature_session_type.h (right): https://codereview.chromium.org/2241203003/diff/280001/extensions/common/features/feature_session_type.h#newcode11 extensions/common/features/feature_session_type.h:11: #include "base/macros.h" nit: unused?
4 years, 4 months ago (2016-08-18 21:13:47 UTC) #48
tbarzic
https://codereview.chromium.org/2241203003/diff/280001/extensions/common/features/feature_session_type.h File extensions/common/features/feature_session_type.h (right): https://codereview.chromium.org/2241203003/diff/280001/extensions/common/features/feature_session_type.h#newcode11 extensions/common/features/feature_session_type.h:11: #include "base/macros.h" On 2016/08/18 at 21:13:46, xiyuan wrote: > ...
4 years, 4 months ago (2016-08-18 21:57:56 UTC) #49
Devlin
https://codereview.chromium.org/2241203003/diff/300001/extensions/common/features/feature_session_type.cc File extensions/common/features/feature_session_type.cc (right): https://codereview.chromium.org/2241203003/diff/300001/extensions/common/features/feature_session_type.cc#newcode15 extensions/common/features/feature_session_type.cc:15: extensions::FeatureSessionType g_current_session_type = kDefaultSessionType; remove extensions:: https://codereview.chromium.org/2241203003/diff/300001/extensions/common/features/feature_session_type.cc#newcode32 extensions/common/features/feature_session_type.cc:32: return ...
4 years, 4 months ago (2016-08-18 23:44:48 UTC) #50
tbarzic
https://codereview.chromium.org/2241203003/diff/300001/extensions/common/features/feature_session_type.cc File extensions/common/features/feature_session_type.cc (right): https://codereview.chromium.org/2241203003/diff/300001/extensions/common/features/feature_session_type.cc#newcode15 extensions/common/features/feature_session_type.cc:15: extensions::FeatureSessionType g_current_session_type = kDefaultSessionType; On 2016/08/18 at 23:44:48, Devlin ...
4 years, 4 months ago (2016-08-19 00:14:05 UTC) #51
Devlin
https://codereview.chromium.org/2241203003/diff/300001/extensions/common/features/feature_session_type.h File extensions/common/features/feature_session_type.h (right): https://codereview.chromium.org/2241203003/diff/300001/extensions/common/features/feature_session_type.h#newcode19 extensions/common/features/feature_session_type.h:19: // property. On 2016/08/19 00:14:05, tbarzic wrote: > On ...
4 years, 4 months ago (2016-08-19 00:43:28 UTC) #52
tbarzic
https://codereview.chromium.org/2241203003/diff/300001/extensions/common/features/feature_session_type.h File extensions/common/features/feature_session_type.h (right): https://codereview.chromium.org/2241203003/diff/300001/extensions/common/features/feature_session_type.h#newcode19 extensions/common/features/feature_session_type.h:19: // property. On 2016/08/19 at 00:43:28, Devlin wrote: > ...
4 years, 4 months ago (2016-08-19 17:23:32 UTC) #53
Devlin
lgtm % nit. Also, your cl description should be updated. https://codereview.chromium.org/2241203003/diff/340001/extensions/common/features/feature_session_type.cc File extensions/common/features/feature_session_type.cc (right): https://codereview.chromium.org/2241203003/diff/340001/extensions/common/features/feature_session_type.cc#newcode24 ...
4 years, 4 months ago (2016-08-22 19:24:59 UTC) #54
tbarzic
https://codereview.chromium.org/2241203003/diff/340001/extensions/common/features/feature_session_type.cc File extensions/common/features/feature_session_type.cc (right): https://codereview.chromium.org/2241203003/diff/340001/extensions/common/features/feature_session_type.cc#newcode24 extensions/common/features/feature_session_type.cc:24: // Make sure that session type stays constants after ...
4 years, 3 months ago (2016-09-08 18:15:01 UTC) #59
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/2241203003/360001
4 years, 3 months ago (2016-09-09 19:01:09 UTC) #64
commit-bot: I haz the power
Committed patchset #19 (id:360001)
4 years, 3 months ago (2016-09-09 20:15:32 UTC) #65
commit-bot: I haz the power
4 years, 3 months ago (2016-09-09 20:18:26 UTC) #67
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/c34cf3c996bf1f088086690c93e61e00f0b640dd
Cr-Commit-Position: refs/heads/master@{#417686}

Powered by Google App Engine
This is Rietveld 408576698