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

Issue 11066015: Finish implementation of controlled setting indicator (Closed)

Created:
8 years, 2 months ago by bartfab (slow)
Modified:
6 years, 3 months ago
CC:
chromium-reviews, arv (Not doing code reviews), stevenjb+watch_chromium.org, oshima+watch_chromium.org, Dan Beam
Visibility:
Public.

Description

Finish implementation of controlled setting indicator This CL completes the implementation of a controlled setting indicator class for Chrome's settings UI. This class can be used to show an icon next to each setting whose value is enforced or recommended by policy or an extension. Clicking on it or selecting the indicator by keyboard brings up an informative bubble. The CL ensures that indicators already used in the Chrome OS network settings remain functional. No further indicators are added to the settings UI - this will be done in follow-up CLs. BUG=104955 TEST=Chrome OS VM with ONC-configured VPN; only here is a controlled TEST=setting indicator currently being used (see crbug.com/137470) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=160351

Patch Set 1 #

Total comments: 13

Patch Set 2 : Comments addressed. #

Patch Set 3 : Comments addressed. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -60 lines) Patch
M chrome/app/generated_resources.grd View 2 chunks +10 lines, -7 lines 0 comments Download
M chrome/browser/resources/options/chromeos/internet_detail.js View 1 2 chunks +20 lines, -17 lines 0 comments Download
M chrome/browser/resources/options/controlled_setting.js View 1 2 6 chunks +52 lines, -16 lines 3 comments Download
M chrome/browser/resources/options/options_page.css View 1 3 chunks +11 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc View 3 chunks +13 lines, -14 lines 0 comments Download
M chrome/browser/ui/webui/options/core_options_handler.cc View 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 14 (1 generated)
bartfab (slow)
Hi everyone, could you please have a look? * James, this completes the implementation of ...
8 years, 2 months ago (2012-10-04 15:27:50 UTC) #1
Nikita (slow)
chromeos options lgtm
8 years, 2 months ago (2012-10-04 16:10:37 UTC) #2
James Hawkins
https://codereview.chromium.org/11066015/diff/1/chrome/browser/resources/options/chromeos/internet_detail.js File chrome/browser/resources/options/chromeos/internet_detail.js (right): https://codereview.chromium.org/11066015/diff/1/chrome/browser/resources/options/chromeos/internet_detail.js#newcode996 chrome/browser/resources/options/chromeos/internet_detail.js:996: if (propName && data[propName]) { Optional nit: Save a ...
8 years, 2 months ago (2012-10-04 16:16:51 UTC) #3
bartfab (slow)
https://chromiumcodereview.appspot.com/11066015/diff/1/chrome/browser/resources/options/chromeos/internet_detail.js File chrome/browser/resources/options/chromeos/internet_detail.js (right): https://chromiumcodereview.appspot.com/11066015/diff/1/chrome/browser/resources/options/chromeos/internet_detail.js#newcode996 chrome/browser/resources/options/chromeos/internet_detail.js:996: if (propName && data[propName]) { On 2012/10/04 16:16:51, James ...
8 years, 2 months ago (2012-10-04 18:55:39 UTC) #4
pneubeck (no reviews)
Looks good. https://codereview.chromium.org/11066015/diff/1/chrome/browser/resources/options/controlled_setting.js File chrome/browser/resources/options/controlled_setting.js (right): https://codereview.chromium.org/11066015/diff/1/chrome/browser/resources/options/controlled_setting.js#newcode46 chrome/browser/resources/options/controlled_setting.js:46: set resetHandler(handler) { Please make it clear ...
8 years, 2 months ago (2012-10-04 18:56:10 UTC) #5
bartfab (slow)
https://chromiumcodereview.appspot.com/11066015/diff/1/chrome/browser/resources/options/controlled_setting.js File chrome/browser/resources/options/controlled_setting.js (right): https://chromiumcodereview.appspot.com/11066015/diff/1/chrome/browser/resources/options/controlled_setting.js#newcode46 chrome/browser/resources/options/controlled_setting.js:46: set resetHandler(handler) { On 2012/10/04 18:56:11, pneubeck wrote: > ...
8 years, 2 months ago (2012-10-04 19:17:15 UTC) #6
James Hawkins
LGTM, thanks.
8 years, 2 months ago (2012-10-04 21:57:59 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/11066015/1008
8 years, 2 months ago (2012-10-05 07:44:26 UTC) #8
commit-bot: I haz the power
Change committed as 160351
8 years, 2 months ago (2012-10-05 12:47:30 UTC) #9
Vitaly Pavlenko
https://chromiumcodereview.appspot.com/11066015/diff/1008/chrome/browser/resources/options/controlled_setting.js File chrome/browser/resources/options/controlled_setting.js (right): https://chromiumcodereview.appspot.com/11066015/diff/1008/chrome/browser/resources/options/controlled_setting.js#newcode89 chrome/browser/resources/options/controlled_setting.js:89: this.controlledBy = null; Hi, I'm compiling Chrome JS with ...
6 years, 3 months ago (2014-09-15 22:35:52 UTC) #11
bartfab (slow)
https://chromiumcodereview.appspot.com/11066015/diff/1008/chrome/browser/resources/options/controlled_setting.js File chrome/browser/resources/options/controlled_setting.js (right): https://chromiumcodereview.appspot.com/11066015/diff/1008/chrome/browser/resources/options/controlled_setting.js#newcode89 chrome/browser/resources/options/controlled_setting.js:89: this.controlledBy = null; On 2014/09/15 22:35:51, Vitaly Pavlenko wrote: ...
6 years, 3 months ago (2014-09-16 14:26:08 UTC) #12
Vitaly Pavlenko
On 2014/09/16 14:26:08, bartfab wrote: > https://chromiumcodereview.appspot.com/11066015/diff/1008/chrome/browser/resources/options/controlled_setting.js > File chrome/browser/resources/options/controlled_setting.js (right): > > https://chromiumcodereview.appspot.com/11066015/diff/1008/chrome/browser/resources/options/controlled_setting.js#newcode89 > ...
6 years, 3 months ago (2014-09-16 18:11:40 UTC) #13
bartfab (slow)
6 years, 3 months ago (2014-09-17 08:18:37 UTC) #14
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/11066015/diff/1008/chrome/browser/reso...
File chrome/browser/resources/options/controlled_setting.js (right):

https://chromiumcodereview.appspot.com/11066015/diff/1008/chrome/browser/reso...
chrome/browser/resources/options/controlled_setting.js:89: this.controlledBy =
null;
On 2014/09/16 14:26:08, bartfab wrote:
> On 2014/09/15 22:35:51, Vitaly Pavlenko wrote:
> > Hi,
> > 
> > I'm compiling Chrome JS with Closure Compiler. Property |controlledBy| is of
> > type (string|null) here, but we trying to remove null values from properties
> > defined by cr.defineProperty(). So I tried to rewrite this line with
> > 
> > this.controlledBy = '';
> > 
> > However, that didn't work and caused a test failure:
> >
>
http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...
> > 
> > I don't see any connection between this variable and test failure. 
> > 
> > So if you remember this code, please help me with to answer either question:
> > 
> > a) Is it possible to use empty string for |controlledBy| instead of null?
What
> > should I rewrite besides this file?
> > 
> > b) Could you suggest, how is that test failure connected with my change?
> > 
> > Thank you,
> > Vitaly
> 
> |controlledBy| controls two things:
> 
> 1) If the property is non-null, a certain UI element (the indicator) will be
> shown.
> 2) The actual property value determines how the indicator behaves.
> 
> Your code is triggering 1), which makes the test fail. You can change the code
> to treat '' like it treats null now.
> 
> However, note that the |controlledBy| value is copied from an event and it may
> be null there. If you want to find all the places that fire this event, look
for
> the comment "Create a synthetic pref change event decorated as
> CoreOptionsHandler::CreateValueForPref() does." I marked all the places in the
> code that fire such events in this way.

https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/res...

This rule will be triggered by '' but not by null.

Powered by Google App Engine
This is Rietveld 408576698