Commit 39d9946a authored by mad@chromium.org's avatar mad@chromium.org

Show an extra privacy warning on Win8

BUG=141723
TEST=Make sure the Win8 privacy warning is shown in the advances settings UI, but ONLY when running on Win8.


Review URL: https://chromiumcodereview.appspot.com/10854126

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152333 0039d316-1c4b-4281-b951-d872f2087c98
parent 13d08b78
...@@ -10923,15 +10923,11 @@ The following application will be launched if you accept this request: ...@@ -10923,15 +10923,11 @@ The following application will be launched if you accept this request:
<message name="IDS_OPTIONS_ENABLE_LOGGING" desc="The label of the checkbox to enable/disable crash and user metrics logging"> <message name="IDS_OPTIONS_ENABLE_LOGGING" desc="The label of the checkbox to enable/disable crash and user metrics logging">
Automatically send usage statistics and crash reports to Google Automatically send usage statistics and crash reports to Google
</message> </message>
<message name="IDS_WINDOWS8_PRIVACY_HANDLING_INFO" desc="The text which describes how user data is handled differently in Windows8"> <if expr="is_win">
Your data is handled differently in Windows 8. <message name="IDS_WINDOWS8_PRIVACY_HANDLING_INFO" desc="The text which describes how user data is handled differently in Windows8">
<ph name="BEGIN_LINK">&lt;a target="_blank" href="$1"&gt;</ph>Learn more<ph name="END_LINK"> Your data is handled differently in Windows 8.
&lt;/a&gt;<ex>&lt;/a&gt;</ex> </message>
</ph>. </if>
</message>
<message name="IDS_WINDOWS8_PRIVACY_HANDLING_INFO_URL" desc="URL of help center page describing how user data is handled differently in Windows8">
"https://support.google.com/chrome/?p=win8_directories"
</message>
<message name="IDS_OPTIONS_TABS_TO_LINKS_PREF" desc="The documentation string of the 'Tabs to Links' preference"> <message name="IDS_OPTIONS_TABS_TO_LINKS_PREF" desc="The documentation string of the 'Tabs to Links' preference">
Pressing Tab on a webpage highlights links, as well as form fields Pressing Tab on a webpage highlights links, as well as form fields
</message> </message>
...@@ -193,6 +193,13 @@ ...@@ -193,6 +193,13 @@
<section> <section>
<h3 i18n-content="advancedSectionTitlePrivacy"></h3> <h3 i18n-content="advancedSectionTitlePrivacy"></h3>
<div> <div>
<if expr="is_win">
<div id="privacy-win8-data-settings" class="settings-row" hidden>
<span i18n-content="privacyWin8Data"></span>
<a target="_blank" i18n-content="learnMore"
i18n-values="href:privacyWin8DataLearnMoreURL"></a>
</div>
</if>
<div class="settings-row"> <div class="settings-row">
<button id="privacyContentSettingsButton" <button id="privacyContentSettingsButton"
i18n-content="privacyContentSettingsButton"></button> i18n-content="privacyContentSettingsButton"></button>
......
...@@ -245,6 +245,11 @@ cr.define('options', function() { ...@@ -245,6 +245,11 @@ cr.define('options', function() {
} }
// Privacy section. // Privacy section.
var winVerMatch = /Windows NT (\d+(?:\.\d+))?/.exec(navigator.userAgent);
var isWin8 = winVerMatch && winVerMatch[1] >= 6.2;
var win8Element = $('privacy-win8-data-settings');
if (win8Element)
win8Element.hidden = !isWin8;
$('privacyContentSettingsButton').onclick = function(event) { $('privacyContentSettingsButton').onclick = function(event) {
OptionsPage.navigateToPage('content'); OptionsPage.navigateToPage('content');
OptionsPage.showTab($('cookies-nav-tab')); OptionsPage.showTab($('cookies-nav-tab'));
......
...@@ -225,6 +225,9 @@ void BrowserOptionsHandler::GetLocalizedValues(DictionaryValue* values) { ...@@ -225,6 +225,9 @@ void BrowserOptionsHandler::GetLocalizedValues(DictionaryValue* values) {
{ "privacyClearDataButton", IDS_OPTIONS_PRIVACY_CLEAR_DATA_BUTTON }, { "privacyClearDataButton", IDS_OPTIONS_PRIVACY_CLEAR_DATA_BUTTON },
{ "privacyContentSettingsButton", { "privacyContentSettingsButton",
IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON }, IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON },
#if defined(OS_WIN)
{ "privacyWin8Data", IDS_WINDOWS8_PRIVACY_HANDLING_INFO },
#endif
{ "profilesCreate", IDS_PROFILES_CREATE_BUTTON_LABEL }, { "profilesCreate", IDS_PROFILES_CREATE_BUTTON_LABEL },
{ "profilesDelete", IDS_PROFILES_DELETE_BUTTON_LABEL }, { "profilesDelete", IDS_PROFILES_DELETE_BUTTON_LABEL },
{ "profilesDeleteSingle", IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL }, { "profilesDeleteSingle", IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL },
...@@ -370,6 +373,10 @@ void BrowserOptionsHandler::GetLocalizedValues(DictionaryValue* values) { ...@@ -370,6 +373,10 @@ void BrowserOptionsHandler::GetLocalizedValues(DictionaryValue* values) {
// Pass along sync status early so it will be available during page init. // Pass along sync status early so it will be available during page init.
values->Set("syncData", GetSyncStateDictionary().release()); values->Set("syncData", GetSyncStateDictionary().release());
#if defined(OS_WIN)
values->SetString("privacyWin8DataLearnMoreURL",
chrome::kPrivacyWin8DataLearnMoreURL);
#endif
values->SetString("privacyLearnMoreURL", chrome::kPrivacyLearnMoreURL); values->SetString("privacyLearnMoreURL", chrome::kPrivacyLearnMoreURL);
values->SetString("sessionRestoreLearnMoreURL", values->SetString("sessionRestoreLearnMoreURL",
chrome::kSessionRestoreLearnMoreURL); chrome::kSessionRestoreLearnMoreURL);
......
...@@ -407,6 +407,11 @@ const char kKillReasonURL[] = ...@@ -407,6 +407,11 @@ const char kKillReasonURL[] =
"https://support.google.com/chrome/?p=e_deadjim"; "https://support.google.com/chrome/?p=e_deadjim";
#endif #endif
#if defined(OS_WIN)
const char kPrivacyWin8DataLearnMoreURL[] =
"https://support.google.com/chrome/?p=win8_directories";
#endif
const char kPrivacyLearnMoreURL[] = const char kPrivacyLearnMoreURL[] =
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
"https://support.google.com/chromeos/?p=settings_privacy"; "https://support.google.com/chromeos/?p=settings_privacy";
......
...@@ -324,6 +324,11 @@ extern const char kCrashReasonURL[]; ...@@ -324,6 +324,11 @@ extern const char kCrashReasonURL[];
// "Learn more" URL for killed tab page. // "Learn more" URL for killed tab page.
extern const char kKillReasonURL[]; extern const char kKillReasonURL[];
#if defined(OS_WIN)
// "Learn more" URL for the Win8 Data Privacy section under Options.
extern const char kPrivacyWin8DataLearnMoreURL[];
#endif
// "Learn more" URL for the Privacy section under Options. // "Learn more" URL for the Privacy section under Options.
extern const char kPrivacyLearnMoreURL[]; extern const char kPrivacyLearnMoreURL[];
......
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