|
|
Chromium Code Reviews|
Created:
4 years, 4 months ago by dschuyler Modified:
4 years, 4 months ago Reviewers:
Finnur CC:
chromium-reviews, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, dbeam+watch-settings_chromium.org, stevenjb+watch-md-settings_chromium.org, arv+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Description[MD settings] extension exceptions in site settings
This CL shows site settings exceptions created by Chrome extensions.
BUG=71179
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Committed: https://crrev.com/b1172d1d706568e8f33178e72735b2480fcbaf22
Cr-Commit-Position: refs/heads/master@{#411765}
Patch Set 1 #
Total comments: 7
Patch Set 2 : review changes #
Messages
Total messages: 19 (13 generated)
Description was changed from ========== [MD settings] extension exceptions in site settings This CL shows site settings exceptions created by Chrome extensions. BUG=71179 ========== to ========== [MD settings] extension exceptions in site settings This CL shows site settings exceptions created by Chrome extensions. BUG=71179 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
The CQ bit was checked by dschuyler@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
dschuyler@chromium.org changed reviewers: + finnur@chromium.org
https://codereview.chromium.org/2240023002/diff/1/chrome/browser/ui/webui/set... File chrome/browser/ui/webui/settings/site_settings_handler.cc (right): https://codereview.chromium.org/2240023002/diff/1/chrome/browser/ui/webui/set... chrome/browser/ui/webui/settings/site_settings_handler.cc:59: void AddExceptionForHostedApp(const std::string& url_pattern, Much of the following is only slightly modified from chrome/browser/ui/webui/options/content_settings_handler.cc
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
This LGTM, with a few nits. There are some philosophical differences in how we base our new code on the old implementation, but we can resolve it afterwards and do follow-ups if needed. https://codereview.chromium.org/2240023002/diff/1/chrome/browser/resources/se... File chrome/browser/resources/settings/site_settings/site_list.js (right): https://codereview.chromium.org/2240023002/diff/1/chrome/browser/resources/se... chrome/browser/resources/settings/site_settings/site_list.js:307: // as well. Sounds good. On a related note: https://bugs.chromium.org/p/chromium/issues/detail?id=636982 https://codereview.chromium.org/2240023002/diff/1/chrome/browser/ui/webui/set... File chrome/browser/ui/webui/settings/site_settings_handler.cc (right): https://codereview.chromium.org/2240023002/diff/1/chrome/browser/ui/webui/set... chrome/browser/ui/webui/settings/site_settings_handler.cc:40: const char kGroupNameNotifications[] = "notifications"; I don't think you need to define these again. You can just use ContentSettingsTypeFromGroupName in site_settings_helper and do the comparison on the content settings type. As in: if (site_settings::ContentSettingsTypeFromGroupName(type) == CONTENT_SETTINGS_TYPE_GEOLOCATION) return extensions::APIPermission::APIPermission::kGeolocation; etc... https://codereview.chromium.org/2240023002/diff/1/chrome/browser/ui/webui/set... chrome/browser/ui/webui/settings/site_settings_handler.cc:59: void AddExceptionForHostedApp(const std::string& url_pattern, We seem to have different views on how to migrate the code from old to new. :) You seem to be optimizing for easy deletion, meaning that once we deprecate the old code we just delete it (because the new code is a copy) and don't look back. I am optimizing for easy maintenance until we deprecate the code, meaning that if someone wants to make a change they do it in one place (shared place) because there's no code duplication (and I then don't have to keep track of changes to the old code). It can be argued both ways, I guess both methods have benefits and drawbacks. But it is a little weird to have 2 CLs from me that do it one way and one from you that does it the other way. :) I've been migrating these consts like kAppName and kAppId over to the site_settings_helper shared class, as they've become needed, and would definitely have moved AddExceptionForHostedApp over because it is identical (and probably at least tried the same with AddExceptionsGrantedByHostedApps). Is it a blocker? No, probably not. But we should probably be consistent.
The CQ bit was checked by dschuyler@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2240023002/diff/1/chrome/browser/resources/se... File chrome/browser/resources/settings/site_settings/site_list.js (right): https://codereview.chromium.org/2240023002/diff/1/chrome/browser/resources/se... chrome/browser/resources/settings/site_settings/site_list.js:307: // as well. On 2016/08/12 15:36:39, Finnur wrote: > Sounds good. > > On a related note: > https://bugs.chromium.org/p/chromium/issues/detail?id=636982 Acknowledged. https://codereview.chromium.org/2240023002/diff/1/chrome/browser/ui/webui/set... File chrome/browser/ui/webui/settings/site_settings_handler.cc (right): https://codereview.chromium.org/2240023002/diff/1/chrome/browser/ui/webui/set... chrome/browser/ui/webui/settings/site_settings_handler.cc:40: const char kGroupNameNotifications[] = "notifications"; On 2016/08/12 15:36:39, Finnur wrote: > I don't think you need to define these again. You can just use > ContentSettingsTypeFromGroupName in site_settings_helper and do the comparison > on the content settings type. As in: > > if (site_settings::ContentSettingsTypeFromGroupName(type) == > CONTENT_SETTINGS_TYPE_GEOLOCATION) > return extensions::APIPermission::APIPermission::kGeolocation; > > etc... Yeah, I like that better. Done. https://codereview.chromium.org/2240023002/diff/1/chrome/browser/ui/webui/set... chrome/browser/ui/webui/settings/site_settings_handler.cc:59: void AddExceptionForHostedApp(const std::string& url_pattern, On 2016/08/12 15:36:39, Finnur wrote: > We seem to have different views on how to migrate the code from old to new. :) > > You seem to be optimizing for easy deletion, meaning that once we deprecate the > old code we just delete it (because the new code is a copy) and don't look back. > > I am optimizing for easy maintenance until we deprecate the code, meaning that > if someone wants to make a change they do it in one place (shared place) because > there's no code duplication (and I then don't have to keep track of changes to > the old code). > > It can be argued both ways, I guess both methods have benefits and drawbacks. > But it is a little weird to have 2 CLs from me that do it one way and one from > you that does it the other way. :) I think either way is valid. I believe Dan's call was to optimize for deletion. An advantage of not touching the existing code is avoiding breakage in the existing version. The bulk of the md-settings work is done on the 'optimize or deletion' style. > I've been migrating these consts like kAppName and kAppId over to the > site_settings_helper shared class, as they've become needed, and would > definitely have moved AddExceptionForHostedApp over because it is identical (and > probably at least tried the same with AddExceptionsGrantedByHostedApps). Shared code that is separate from either the old or new UI code is good with me. > Is it a blocker? No, probably not. But we should probably be consistent. I agree with this not really being a blocker, but being consistent is important. Let's chat about this further outside of this CL.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by dschuyler@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from finnur@chromium.org Link to the patchset: https://codereview.chromium.org/2240023002/#ps20001 (title: "review changes")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== [MD settings] extension exceptions in site settings This CL shows site settings exceptions created by Chrome extensions. BUG=71179 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== [MD settings] extension exceptions in site settings This CL shows site settings exceptions created by Chrome extensions. BUG=71179 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/b1172d1d706568e8f33178e72735b2480fcbaf22 Cr-Commit-Position: refs/heads/master@{#411765} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/b1172d1d706568e8f33178e72735b2480fcbaf22 Cr-Commit-Position: refs/heads/master@{#411765} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
