Commit 5a2a2f2a authored by deepak.m1's avatar deepak.m1 Committed by Commit bot

Changing Option String Resource to lowerCamelcases in content_settings_handler.cc file.

BUG=469633

Review URL: https://codereview.chromium.org/1021413004

Cr-Commit-Position: refs/heads/master@{#322350}
parent d9a155a6
......@@ -74,8 +74,8 @@
</div>
</div>
<div id="flash-storage-settings" class="flash-plugin-area">
<a target="_blank" i18n-content="flash_storage_settings"
i18n-values="href:flash_storage_url"></a>
<a target="_blank" i18n-content="flashStorageSettings"
i18n-values="href:flashStorageUrl"></a>
</div>
</div>
<div class="action-area">
......
......@@ -40,7 +40,7 @@
<label>
<input pref="profile.block_third_party_cookies" type="checkbox">
<span>
<span i18n-content="cookies_block_3rd_party"></span>
<span i18n-content="cookiesBlock3rdParty"></span>
<span class="controlled-setting-indicator"
pref="profile.block_third_party_cookies"></span>
</label>
......@@ -51,9 +51,9 @@
<label>
<input id="clear-cookies-on-exit"
pref="profile.clear_site_data_on_exit" type="checkbox">
<span i18n-content="cookies_lso_clear_when_close"
<span i18n-content="cookiesLsoClearWhenClose"
class="clear-plugin-lso-data-enabled"></span>
<span i18n-content="cookies_clear_when_close"
<span i18n-content="cookiesClearWhenClose"
class="clear-plugin-lso-data-disabled"></span>
</label>
</div>
......@@ -61,7 +61,7 @@
<button class="exceptions-list-button" contentType="cookies"
i18n-content="manageExceptions"></button>
<button id="show-cookies-button"
i18n-content="cookies_show_cookies"></button>
i18n-content="cookiesShowCookies"></button>
</div>
</div>
<div class="experimental-website-settings" hidden>
......@@ -70,7 +70,7 @@
<button class="website-settings-permission-button"
contentType="cookies" i18n-content="websitesManage"></button>
<button id="show-cookies-button"
i18n-content="cookies_show_cookies"></button>
i18n-content="cookiesShowCookies"></button>
</div>
</div>
</section>
......@@ -168,7 +168,7 @@
</div>
<div class="settings-row">
<button id="manage-handlers-button" contentType="handlers"
i18n-content="manage_handlers"></button>
i18n-content="manageHandlers"></button>
</div>
</div>
</section>
......@@ -600,7 +600,7 @@
</section>
<!-- MIDI system exclusive messages filter -->
<section>
<h3 i18n-content="midi-sysex_header"></h3>
<h3 i18n-content="midiSysexHeader"></h3>
<div>
<div class="radio">
<label>
......@@ -628,7 +628,7 @@
</section>
<!-- Push messaging filter -->
<section id="experimental-push-messaging-settings" hidden="true">
<h3 i18n-content="push-messaging_header"></h3>
<h3 i18n-content="pushMessagingHeader"></h3>
<div>
<div class="radio">
<label>
......@@ -656,7 +656,7 @@
</section>
<!-- Page zoom levels -->
<section id="page-zoom-levels">
<h3 i18n-content="zoomlevels_header"></h3>
<h3 i18n-content="zoomlevelsHeader"></h3>
<div>
<div class="settings-row">
<button class="exceptions-list-button" contentType="zoomlevels"
......
......@@ -17,20 +17,20 @@
<div contentType="cookies">
<list mode="normal"></list>
<div>
<span class="otr-explanation" i18n-content="otr_exceptions_explanation">
<span class="otr-explanation" i18n-content="otrExceptionsExplanation">
</span>
<list mode="otr"></list>
</div>
<div class="flash-plugin-area">
<a i18n-values="href:flash_storage_url" target="_blank"
i18n-content="flash_storage_settings">
<a i18n-values="href:flashStorageUrl" target="_blank"
i18n-content="flashStorageSettings">
</a>
</div>
</div>
<div contentType="images">
<list mode="normal"></list>
<div>
<span class="otr-explanation" i18n-content="otr_exceptions_explanation">
<span class="otr-explanation" i18n-content="otrExceptionsExplanation">
</span>
<list mode="otr"></list>
</div>
......@@ -38,7 +38,7 @@
<div contentType="javascript">
<list mode="normal"></list>
<div>
<span class="otr-explanation" i18n-content="otr_exceptions_explanation">
<span class="otr-explanation" i18n-content="otrExceptionsExplanation">
</span>
<list mode="otr"></list>
</div>
......@@ -46,7 +46,7 @@
<div contentType="plugins">
<list mode="normal"></list>
<div>
<span class="otr-explanation" i18n-content="otr_exceptions_explanation">
<span class="otr-explanation" i18n-content="otrExceptionsExplanation">
</span>
<list mode="otr"></list>
</div>
......@@ -54,7 +54,7 @@
<div contentType="popups">
<list mode="normal"></list>
<div>
<span class="otr-explanation" i18n-content="otr_exceptions_explanation">
<span class="otr-explanation" i18n-content="otrExceptionsExplanation">
</span>
<list mode="otr"></list>
</div>
......@@ -68,7 +68,7 @@
<div contentType="fullscreen">
<list mode="normal"></list>
<div>
<span class="otr-explanation" i18n-content="otr_exceptions_explanation">
<span class="otr-explanation" i18n-content="otrExceptionsExplanation">
</span>
<list mode="otr"></list>
</div>
......@@ -76,7 +76,7 @@
<div contentType="mouselock">
<list mode="normal"></list>
<div>
<span class="otr-explanation" i18n-content="otr_exceptions_explanation">
<span class="otr-explanation" i18n-content="otrExceptionsExplanation">
</span>
<list mode="otr"></list>
</div>
......@@ -84,7 +84,7 @@
<div contentType="protectedContent">
<list mode="normal"></list>
<div>
<span class="otr-explanation" i18n-content="otr_exceptions_explanation">
<span class="otr-explanation" i18n-content="otrExceptionsExplanation">
</span>
<list mode="otr"></list>
</div>
......@@ -99,7 +99,7 @@
<div contentType="media-stream">
<list mode="normal"></list>
<div>
<span class="otr-explanation" i18n-content="otr_exceptions_explanation">
<span class="otr-explanation" i18n-content="otrExceptionsExplanation">
</span>
<list mode="otr"></list>
</div>
......@@ -112,7 +112,7 @@
<div contentType="ppapi-broker">
<list mode="normal"></list>
<div>
<span class="otr-explanation" i18n-content="otr_exceptions_explanation">
<span class="otr-explanation" i18n-content="otrExceptionsExplanation">
</span>
<list mode="otr"></list>
</div>
......@@ -123,7 +123,7 @@
<div contentType="midi-sysex">
<list mode="normal"></list>
<div>
<span class="otr-explanation" i18n-content="otr_exceptions_explanation">
<span class="otr-explanation" i18n-content="otrExceptionsExplanation">
</span>
<list mode="otr"></list>
</div>
......@@ -131,7 +131,7 @@
<div contentType="push-messaging">
<list mode="normal"></list>
<div>
<span class="otr-explanation" i18n-content="otr_exceptions_explanation">
<span class="otr-explanation" i18n-content="otrExceptionsExplanation">
</span>
<list mode="otr"></list>
</div>
......@@ -139,7 +139,7 @@
<div contentType="zoomlevels">
<list mode="normal"></list>
<div>
<span class="otr-explanation" i18n-content="otr_exceptions_explanation">
<span class="otr-explanation" i18n-content="otrExceptionsExplanation">
</span>
<list mode="otr"></list>
</div>
......
......@@ -189,7 +189,7 @@ cr.define('options.contentSettings', function() {
// icon of the app.
if (controlledBy == 'HostedApp') {
this.title =
loadTimeData.getString('set_by') + ' ' + this.dataItem.appName;
loadTimeData.getString('setBy') + ' ' + this.dataItem.appName;
var button = this.querySelector('.row-delete-button');
// Use the host app's favicon (16px, match bigger size).
// See c/b/ui/webui/extensions/extension_icon_source.h
......@@ -621,7 +621,10 @@ cr.define('options.contentSettings', function() {
this.title = loadTimeData.getString(type + 'TabTitle');
var header = this.pageDiv.querySelector('h1');
header.textContent = loadTimeData.getString(type + '_header');
var camelCasedType = type.replace(/-([a-z])/g, function(g) {
return g[1].toUpperCase();
});
header.textContent = loadTimeData.getString(camelCasedType + 'Header');
var divs = this.pageDiv.querySelectorAll('div[contentType]');
for (var i = 0; i < divs.length; i++) {
......
......@@ -275,78 +275,77 @@ void ContentSettingsHandler::GetLocalizedValues(
base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
// TODO(dhnishi): Standardize to lowerCamelCase.
static OptionsStringResource resources[] = {
{"allowException", IDS_EXCEPTIONS_ALLOW_BUTTON},
{"blockException", IDS_EXCEPTIONS_BLOCK_BUTTON},
{"sessionException", IDS_EXCEPTIONS_SESSION_ONLY_BUTTON},
{"detectException", IDS_EXCEPTIONS_DETECT_IMPORTANT_CONTENT_BUTTON},
{"askException", IDS_EXCEPTIONS_ASK_BUTTON},
{"otr_exceptions_explanation", IDS_EXCEPTIONS_OTR_LABEL},
{"otrExceptionsExplanation", IDS_EXCEPTIONS_OTR_LABEL},
{"addNewExceptionInstructions", IDS_EXCEPTIONS_ADD_NEW_INSTRUCTIONS},
{"manageExceptions", IDS_EXCEPTIONS_MANAGE},
{"manage_handlers", IDS_HANDLERS_MANAGE},
{"manageHandlers", IDS_HANDLERS_MANAGE},
{"exceptionPatternHeader", IDS_EXCEPTIONS_PATTERN_HEADER},
{"exceptionBehaviorHeader", IDS_EXCEPTIONS_ACTION_HEADER},
{"exceptionZoomHeader", IDS_EXCEPTIONS_ZOOM_HEADER},
{"embeddedOnHost", IDS_EXCEPTIONS_GEOLOCATION_EMBEDDED_ON_HOST},
// Cookies filter.
{"cookiesTabLabel", IDS_COOKIES_TAB_LABEL},
{"cookies_header", IDS_COOKIES_HEADER},
{"cookiesHeader", IDS_COOKIES_HEADER},
{"cookiesAllow", IDS_COOKIES_ALLOW_RADIO},
{"cookiesBlock", IDS_COOKIES_BLOCK_RADIO},
{"cookiesSession", IDS_COOKIES_SESSION_ONLY_RADIO},
{"cookies_block_3rd_party", IDS_COOKIES_BLOCK_3RDPARTY_CHKBOX},
{"cookies_clear_when_close", IDS_COOKIES_CLEAR_WHEN_CLOSE_CHKBOX},
{"cookies_lso_clear_when_close", IDS_COOKIES_LSO_CLEAR_WHEN_CLOSE_CHKBOX},
{"cookies_show_cookies", IDS_COOKIES_SHOW_COOKIES_BUTTON},
{"flash_storage_settings", IDS_FLASH_STORAGE_SETTINGS},
{"flash_storage_url", IDS_FLASH_STORAGE_URL},
{"cookiesBlock3rdParty", IDS_COOKIES_BLOCK_3RDPARTY_CHKBOX},
{"cookiesClearWhenClose", IDS_COOKIES_CLEAR_WHEN_CLOSE_CHKBOX},
{"cookiesLsoClearWhenClose", IDS_COOKIES_LSO_CLEAR_WHEN_CLOSE_CHKBOX},
{"cookiesShowCookies", IDS_COOKIES_SHOW_COOKIES_BUTTON},
{"flashStorageSettings", IDS_FLASH_STORAGE_SETTINGS},
{"flashStorageUrl", IDS_FLASH_STORAGE_URL},
#if defined(ENABLE_GOOGLE_NOW)
{"googleGeolocationAccessEnable",
IDS_GEOLOCATION_GOOGLE_ACCESS_ENABLE_CHKBOX},
#endif
// Image filter.
{"imagesTabLabel", IDS_IMAGES_TAB_LABEL},
{"images_header", IDS_IMAGES_HEADER},
{"imagesHeader", IDS_IMAGES_HEADER},
{"imagesAllow", IDS_IMAGES_LOAD_RADIO},
{"imagesBlock", IDS_IMAGES_NOLOAD_RADIO},
// JavaScript filter.
{"javascriptTabLabel", IDS_JAVASCRIPT_TAB_LABEL},
{"javascript_header", IDS_JAVASCRIPT_HEADER},
{"javascriptHeader", IDS_JAVASCRIPT_HEADER},
{"javascriptAllow", IDS_JS_ALLOW_RADIO},
{"javascriptBlock", IDS_JS_DONOTALLOW_RADIO},
// Plugins filter.
{"pluginsTabLabel", IDS_PLUGIN_TAB_LABEL},
{"plugins_header", IDS_PLUGIN_HEADER},
{"pluginsHeader", IDS_PLUGIN_HEADER},
{"pluginsAllow", IDS_PLUGIN_ALLOW_RADIO},
{"pluginsDetect", IDS_PLUGIN_DETECT_RADIO},
{"pluginsBlock", IDS_PLUGIN_BLOCK_RADIO},
{"manageIndividualPlugins", IDS_PLUGIN_MANAGE_INDIVIDUAL},
// Pop-ups filter.
{"popupsTabLabel", IDS_POPUP_TAB_LABEL},
{"popups_header", IDS_POPUP_HEADER},
{"popupsHeader", IDS_POPUP_HEADER},
{"popupsAllow", IDS_POPUP_ALLOW_RADIO},
{"popupsBlock", IDS_POPUP_BLOCK_RADIO},
// Location filter.
{"locationTabLabel", IDS_GEOLOCATION_TAB_LABEL},
{"location_header", IDS_GEOLOCATION_HEADER},
{"locationHeader", IDS_GEOLOCATION_HEADER},
{"locationAllow", IDS_GEOLOCATION_ALLOW_RADIO},
{"locationAsk", IDS_GEOLOCATION_ASK_RADIO},
{"locationBlock", IDS_GEOLOCATION_BLOCK_RADIO},
{"set_by", IDS_GEOLOCATION_SET_BY_HOVER},
{"setBy", IDS_GEOLOCATION_SET_BY_HOVER},
// Notifications filter.
{"notificationsTabLabel", IDS_NOTIFICATIONS_TAB_LABEL},
{"notifications_header", IDS_NOTIFICATIONS_HEADER},
{"notificationsHeader", IDS_NOTIFICATIONS_HEADER},
{"notificationsAllow", IDS_NOTIFICATIONS_ALLOW_RADIO},
{"notificationsAsk", IDS_NOTIFICATIONS_ASK_RADIO},
{"notificationsBlock", IDS_NOTIFICATIONS_BLOCK_RADIO},
// Fullscreen filter.
{"fullscreenTabLabel", IDS_FULLSCREEN_TAB_LABEL},
{"fullscreen_header", IDS_FULLSCREEN_HEADER},
{"fullscreenHeader", IDS_FULLSCREEN_HEADER},
// Mouse Lock filter.
{"mouselockTabLabel", IDS_MOUSE_LOCK_TAB_LABEL},
{"mouselock_header", IDS_MOUSE_LOCK_HEADER},
{"mouselockHeader", IDS_MOUSE_LOCK_HEADER},
{"mouselockAllow", IDS_MOUSE_LOCK_ALLOW_RADIO},
{"mouselockAsk", IDS_MOUSE_LOCK_ASK_RADIO},
{"mouselockBlock", IDS_MOUSE_LOCK_BLOCK_RADIO},
......@@ -355,11 +354,11 @@ void ContentSettingsHandler::GetLocalizedValues(
{"protectedContentTabLabel", IDS_PROTECTED_CONTENT_TAB_LABEL},
{"protectedContentInfo", IDS_PROTECTED_CONTENT_INFO},
{"protectedContentEnable", IDS_PROTECTED_CONTENT_ENABLE},
{"protectedContent_header", IDS_PROTECTED_CONTENT_HEADER},
{"protectedContentHeader", IDS_PROTECTED_CONTENT_HEADER},
#endif // defined(OS_CHROMEOS) || defined(OS_WIN)
// Media stream capture device filter.
{"mediaStreamTabLabel", IDS_MEDIA_STREAM_TAB_LABEL},
{"media-stream_header", IDS_MEDIA_STREAM_HEADER},
{"mediaStreamHeader", IDS_MEDIA_STREAM_HEADER},
{"mediaStreamAsk", IDS_MEDIA_STREAM_ASK_RADIO},
{"mediaStreamBlock", IDS_MEDIA_STREAM_BLOCK_RADIO},
{"mediaStreamAudioAsk", IDS_MEDIA_STREAM_ASK_AUDIO_ONLY_RADIO},
......@@ -378,28 +377,28 @@ void ContentSettingsHandler::GetLocalizedValues(
{"mediaPepperFlashGlobalPrivacyURL", IDS_FLASH_GLOBAL_PRIVACY_URL},
{"mediaPepperFlashWebsitePrivacyURL", IDS_FLASH_WEBSITE_PRIVACY_URL},
// PPAPI broker filter.
{"ppapi-broker_header", IDS_PPAPI_BROKER_HEADER},
{"ppapiBrokerHeader", IDS_PPAPI_BROKER_HEADER},
{"ppapiBrokerTabLabel", IDS_PPAPI_BROKER_TAB_LABEL},
{"ppapiBrokerAllow", IDS_PPAPI_BROKER_ALLOW_RADIO},
{"ppapiBrokerAsk", IDS_PPAPI_BROKER_ASK_RADIO},
{"ppapiBrokerBlock", IDS_PPAPI_BROKER_BLOCK_RADIO},
// Multiple automatic downloads
{"multipleAutomaticDownloadsTabLabel", IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL},
{"multiple-automatic-downloads_header", IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL},
{"multipleAutomaticDownloadsHeader", IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL},
{"multipleAutomaticDownloadsAllow", IDS_AUTOMATIC_DOWNLOADS_ALLOW_RADIO},
{"multipleAutomaticDownloadsAsk", IDS_AUTOMATIC_DOWNLOADS_ASK_RADIO},
{"multipleAutomaticDownloadsBlock", IDS_AUTOMATIC_DOWNLOADS_BLOCK_RADIO},
// MIDI system exclusive messages
{"midi-sysex_header", IDS_MIDI_SYSEX_TAB_LABEL},
{"midiSysexHeader", IDS_MIDI_SYSEX_TAB_LABEL},
{"midiSysExAllow", IDS_MIDI_SYSEX_ALLOW_RADIO},
{"midiSysExAsk", IDS_MIDI_SYSEX_ASK_RADIO},
{"midiSysExBlock", IDS_MIDI_SYSEX_BLOCK_RADIO},
// Push messaging strings
{"push-messaging_header", IDS_PUSH_MESSAGES_TAB_LABEL},
{"pushMessagingHeader", IDS_PUSH_MESSAGES_TAB_LABEL},
{"pushMessagingAllow", IDS_PUSH_MESSSAGING_ALLOW_RADIO},
{"pushMessagingAsk", IDS_PUSH_MESSSAGING_ASK_RADIO},
{"pushMessagingBlock", IDS_PUSH_MESSSAGING_BLOCK_RADIO},
{"zoomlevels_header", IDS_ZOOMLEVELS_HEADER_AND_TAB_LABEL},
{"zoomlevelsHeader", IDS_ZOOMLEVELS_HEADER_AND_TAB_LABEL},
{"zoomLevelsManage", IDS_ZOOMLEVELS_MANAGE_BUTTON},
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment