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

Issue 2477453002: MD Settings: Sync route paths in JavaScript to URL constants in C++ (Closed)

Created:
4 years, 1 month ago by tommycli
Modified:
3 years, 7 months ago
Reviewers:
Dan Beam
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
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MD Settings: Sync route paths in JavaScript to URL constants in C++ This tries to prevent further legacy-URL breakages by explicitly linking URL constants in C++ to route declarations in JavaScript. BUG=661694 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Patch Set 1 #

Patch Set 2 : fix js compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -21 lines) Patch
M chrome/browser/resources/settings/compiled_resources2.gyp View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/resources/settings/route.html View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/resources/settings/route.js View 5 chunks +31 lines, -19 lines 0 comments Download
M chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc View 3 chunks +35 lines, -0 lines 0 comments Download
M chrome/common/url_constants.h View 2 chunks +1 line, -1 line 0 comments Download
M chrome/common/url_constants.cc View 2 chunks +1 line, -1 line 0 comments Download

Messages

Total messages: 16 (10 generated)
tommycli
dbeam: PTAL I think this patch is a narrow win. It prevents some breakages at ...
4 years, 1 month ago (2016-11-02 22:33:57 UTC) #7
Dan Beam
i don't think it's worth all these keys can we make a routes dictionary? var ...
4 years, 1 month ago (2016-11-02 22:57:18 UTC) #10
Dan Beam
On 2016/11/02 22:33:57, tommycli wrote: > dbeam: PTAL > > I think this patch is ...
4 years, 1 month ago (2016-11-02 22:58:19 UTC) #11
tommycli
On 2016/11/02 22:57:18, Dan Beam wrote: > i don't think it's worth all these keys ...
4 years, 1 month ago (2016-11-02 23:11:37 UTC) #12
Dan Beam
On 2016/11/02 23:11:37, tommycli wrote: > On 2016/11/02 22:57:18, Dan Beam wrote: > > i ...
4 years, 1 month ago (2016-11-05 00:51:29 UTC) #15
michaelpg
4 years, 1 month ago (2016-11-05 01:37:19 UTC) #16
On 2016/11/02 23:11:37, tommycli wrote:
> On 2016/11/02 22:57:18, Dan Beam wrote:
> > i don't think it's worth all these keys
> > 
> > can we make a routes dictionary?
> > 
> > var p = loadTimeData.getValue('paths');
> > 
> > r.INTERNET = r.BASIC.createSection(p.INTERNET);
> 
> Unfortunately that loses the runtime assertions of loadTimeData if we
fatfinger
> a path name. And also closure compile fails.

can we just move the run-time checking to createChild?

r.INTERNET = r.BASIC.createSection('internet');

Powered by Google App Engine
This is Rietveld 408576698