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

Issue 1351223003: Allow extensions to specify that they are not allowed in incognito mode. (Closed)

Created:
5 years, 3 months ago by Not at Google. Contact bengr
Modified:
5 years, 3 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow extensions to specify that they are not allowed in incognito mode. Add "not_allowed" as a valid value to the "incognito" field in the manifest. Track incognito behavior using an enum instead of a boolean to distinguish between "split", "spanning", and "not_allowed". Add CanBeIncognitoEnabled method to utils which checks the manifest entry in addition to checking if extension is platform app or component. BUG=455756 Committed: https://crrev.com/e548e74412d0a18f8829ce60201eb953a700b09b Cr-Commit-Position: refs/heads/master@{#349806}

Patch Set 1 #

Patch Set 2 : Minor formatting #

Total comments: 6

Patch Set 3 : Tests. Refactor CanBeIncognitoEnabled to util. #

Total comments: 2

Patch Set 4 : Add expectations for IncognitoInfo to test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -34 lines) Patch
M chrome/browser/extensions/api/developer_private/extension_info_generator.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/messaging/message_service.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_util.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/installed_loader.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M extensions/browser/extension_util.h View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M extensions/browser/extension_util.cc View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M extensions/common/extension.h View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M extensions/common/extension.cc View 1 2 2 chunks +1 line, -5 lines 0 comments Download
M extensions/common/manifest_constants.h View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/common/manifest_constants.cc View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/common/manifest_handlers/incognito_info.h View 1 1 chunk +9 lines, -2 lines 0 comments Download
M extensions/common/manifest_handlers/incognito_info.cc View 1 2 3 chunks +24 lines, -17 lines 0 comments Download
A extensions/common/manifest_handlers/incognito_manifest_unittest.cc View 1 2 3 1 chunk +45 lines, -0 lines 0 comments Download
M extensions/extensions_tests.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A + extensions/test/data/manifest_tests/incognito_not_allowed.json View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + extensions/test/data/manifest_tests/incognito_spanning.json View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + extensions/test/data/manifest_tests/incognito_split.json View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + extensions/test/data/manifest_tests/minimal.json View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 12 (2 generated)
Not at Google. Contact bengr
kalman: extensions/common/extension.cc extensions/common/manifest_constants.cc extensions/common/manifest_constants.h extensions/common/manifest_handlers/incognito_info.cc extensions/common/manifest_handlers/incognito_info.h
5 years, 3 months ago (2015-09-17 22:45:42 UTC) #2
not at google - send to devlin
Thanks for doing this. A test would be nice. https://codereview.chromium.org/1351223003/diff/20001/extensions/common/extension.cc File extensions/common/extension.cc (right): https://codereview.chromium.org/1351223003/diff/20001/extensions/common/extension.cc#newcode444 extensions/common/extension.cc:444: ...
5 years, 3 months ago (2015-09-17 22:59:55 UTC) #3
Not at Google. Contact bengr
Thanks for the quick review. Added tests and addressed comments. https://codereview.chromium.org/1351223003/diff/20001/extensions/common/extension.cc File extensions/common/extension.cc (right): https://codereview.chromium.org/1351223003/diff/20001/extensions/common/extension.cc#newcode444 ...
5 years, 3 months ago (2015-09-18 21:24:31 UTC) #4
not at google - send to devlin
lgtm
5 years, 3 months ago (2015-09-18 21:45:17 UTC) #5
not at google - send to devlin
https://codereview.chromium.org/1351223003/diff/40001/extensions/common/manifest_handlers/incognito_manifest_unittest.cc File extensions/common/manifest_handlers/incognito_manifest_unittest.cc (right): https://codereview.chromium.org/1351223003/diff/40001/extensions/common/manifest_handlers/incognito_manifest_unittest.cc#newcode15 extensions/common/manifest_handlers/incognito_manifest_unittest.cc:15: LoadAndExpectSuccess("incognito_not_allowed.json")); actually can you also make assertions about the ...
5 years, 3 months ago (2015-09-18 21:49:20 UTC) #6
Not at Google. Contact bengr
https://codereview.chromium.org/1351223003/diff/40001/extensions/common/manifest_handlers/incognito_manifest_unittest.cc File extensions/common/manifest_handlers/incognito_manifest_unittest.cc (right): https://codereview.chromium.org/1351223003/diff/40001/extensions/common/manifest_handlers/incognito_manifest_unittest.cc#newcode15 extensions/common/manifest_handlers/incognito_manifest_unittest.cc:15: LoadAndExpectSuccess("incognito_not_allowed.json")); On 2015/09/18 21:49:20, kalman wrote: > actually can ...
5 years, 3 months ago (2015-09-18 22:07:33 UTC) #7
not at google - send to devlin
(lgtm)
5 years, 3 months ago (2015-09-18 22:08:21 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1351223003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1351223003/60001
5 years, 3 months ago (2015-09-18 22:34:10 UTC) #10
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 3 months ago (2015-09-18 23:19:17 UTC) #11
commit-bot: I haz the power
5 years, 3 months ago (2015-09-18 23:19:55 UTC) #12
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/e548e74412d0a18f8829ce60201eb953a700b09b
Cr-Commit-Position: refs/heads/master@{#349806}

Powered by Google App Engine
This is Rietveld 408576698