summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/generated_resources.grd64
-rw-r--r--chrome/browser/about_flags.cc4
-rw-r--r--chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc7
-rw-r--r--chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc3
-rw-r--r--chrome/browser/printing/cloud_print/cloud_print_setup_source.cc4
-rw-r--r--chrome/browser/resources/options/advanced_options.html18
-rw-r--r--chrome/browser/resources/options/advanced_options.js40
-rw-r--r--chrome/browser/resources/options2/advanced_options.html18
-rw-r--r--chrome/browser/resources/options2/advanced_options.js40
-rw-r--r--chrome/browser/ui/webui/options/advanced_options_handler.cc120
-rw-r--r--chrome/browser/ui/webui/options/advanced_options_handler.h22
-rw-r--r--chrome/browser/ui/webui/options2/advanced_options_handler2.cc120
-rw-r--r--chrome/browser/ui/webui/options2/advanced_options_handler2.h22
-rw-r--r--chrome/browser/ui/webui/print_preview_data_source.cc11
-rw-r--r--chrome/service/cloud_print/cloud_print_connector.cc6
-rw-r--r--chrome/service/cloud_print/print_system_win.cc5
-rw-r--r--chrome/service/service_process.cc3
17 files changed, 279 insertions, 228 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 6c8cc79..06123b33 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -4716,11 +4716,11 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_XSS_AUDITOR_DESCRIPTION" desc="Description of the 'XSS Auditor' lab.">
Enables WebKit's XSS Auditor (cross-site scripting protection). This feature aims to protect you from certain attacks of malicious websites. It improves your security, but it might not be compatible with all websites.
</message>
- <message name="IDS_FLAGS_CLOUD_PRINT_PROXY_NAME" desc="Title of the Cloud Print Proxy lab">
- Cloud Print Proxy
+ <message name="IDS_FLAGS_CLOUD_PRINT_CONNECTOR_NAME" desc="Title of the Cloud Print Connector lab">
+ Cloud Print Connector
</message>
- <message name="IDS_FLAGS_CLOUD_PRINT_PROXY_DESCRIPTION" desc="Description of the Cloud Print Proxy lab">
- Enables a background service that connects the <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> service to any printers installed on this computer. Once this lab is enabled, you can turn <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> on by logging in with your Google account in the Options/Preferences in the Under the Hood section.
+ <message name="IDS_FLAGS_CLOUD_PRINT_CONNECTOR_DESCRIPTION" desc="Description of the Cloud Print Connector lab">
+ Enables a background service that connects the Google Cloud Print service to any printers installed on this computer. Once this lab is enabled, you can turn the Google Cloud Print Connector on by logging in with your Google account in the Options/Preferences in the Under the Hood section.
</message>
<message name="IDS_FLAGS_CRXLESS_WEB_APPS_NAME" desc="Title of the CRX-less web apps lab">
CRX-less Web Apps
@@ -6433,19 +6433,19 @@ The following plug-in is unresponsive: <ph name="PLUGIN_NAME">$1
<!-- Cloud Print proxy strings -->
<message name="IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL" desc="Label for the cloud print section of the Chrome OS advanced options dialog.">
- Set up or manage printers in <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph>
+ Set up or manage printers in <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph>
</message>
<message name="IDS_CLOUD_PRINT_CHROMEOS_OPTION_BUTTON" desc="Text on a button to go to the cloud print home page from the Chrome OS advanced options dialog.">
- Open <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph>
+ Open <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph>
</message>
<message name="IDS_CLOUD_PRINT_SETUP_DIALOG_TITLE" desc="Title of the cloud print setup dialog.">
- Set up <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph>
+ Set up <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph>
</message>
<message name="IDS_CLOUD_PRINT_SETUP_HEADER" desc="Intro line of the cloud print setup dialog.">
- Access and share your printers online with <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph>
+ Access and share your printers online with <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph>
</message>
<message name="IDS_CLOUD_PRINT_SETUP_EXPLAIN" desc="Explanation of the cloud print setup dialog.">
- <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> is built on the idea that printing can be more intuitive, accessible, and useful. Using <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> you can make your printers available to you from any <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> enabled web or mobile app.
+ <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph> is built on the idea that printing can be more intuitive, accessible, and useful. Using <ph name="CLOUD_PRINT_NAME">&lt;span jscontent="googleCloudPrint"&gt;&lt;/span&gt;<ex>Google Cloud Print</ex></ph> you can make your printers available to you from any <ph name="CLOUD_PRINT_NAME">&lt;span jscontent="googleCloudPrint"&gt;&lt;/span&gt;<ex>Google Cloud Print</ex></ph> enabled web or mobile app.
</message>
<message name="IDS_CLOUD_PRINT_SETUP_ANYWHERE_HEADER" desc="Intro line about printing from anywhere.">
Print from anywhere
@@ -6466,22 +6466,22 @@ The following plug-in is unresponsive: <ph name="PLUGIN_NAME">$1
Share and control access to your printers with any Google account.
</message>
<message name="IDS_CLOUD_PRINT_SETUP_DONE" desc="Message on completed set up of cloud print.">
- You have successfully enabled <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph>! <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> has registered the printers on this machine with &lt;b&gt;<ph name="EMAIL_ADDRESSES">$2<ex>foo@example.com</ex></ph>&lt;/b&gt;. You can now print to your printers from any <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> enabled web or mobile app!
+ <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph> has registered the printers on this machine with &lt;b&gt;<ph name="EMAIL_ADDRESSES">$2<ex>foo@example.com</ex></ph>&lt;/b&gt;. You can now print to your printers from any <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph> enabled web or mobile app!
</message>
<message name="IDS_CLOUD_PRINT_SETUP_TEST_PAGE" desc="Label on button for printing a test page.">
Print a Test Page
</message>
<message name="IDS_CLOUD_PRINT_REGISTER_PRINTER_FAILED" desc="Status message to be sent to the server when we failed to retrieve information about a printer to register.">
- An error occurred while retrieving printer capabilities for printer <ph name="PRINTER_NAME">$1<ex>HP Laserjet 7900</ex></ph>. This printer could not be registered with <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph>.
+ An error occurred while retrieving printer capabilities for printer <ph name="PRINTER_NAME">$1<ex>HP Laserjet 7900</ex></ph>. This printer could not be registered with <ph name="CLOUD_PRINT_NAME">$2<ex>Google Cloud Print</ex></ph>.
</message>
<message name="IDS_CLOUD_PRINT_XPS_UNAVAILABLE" desc="Status message to be sent to the Cloud Print server when the XPS framework is missing.">
- The <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> connector requires that the Microsoft XML Paper Specification Essentials Pack be installed.
+ The <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph> connector requires that the Microsoft XML Paper Specification Essentials Pack be installed.
</message>
<message name="IDS_CLOUD_PRINT_ENUM_FAILED" desc="Status message to be sent to the Cloud Print server when enumerating printers failed.">
- There was a problem listing printers. Some of your printers may not have registered successfully with <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph>.
+ There was a problem listing printers. Some of your printers may not have registered successfully with <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph>.
</message>
<message name="IDS_SERVICE_CRASH_RECOVERY_CONTENT" desc="Text content telling the user the service process has crashed.">
- The <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> connector process has crashed. Restart?
+ The <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph> connector process has crashed. Restart?
</message>
<!-- Print Preview -->
@@ -6577,11 +6577,11 @@ The following plug-in is unresponsive: <ph name="PLUGIN_NAME">$1
</message>
<message name="IDS_PRINT_PREVIEW_PRINT_WITH_CLOUD_PRINT"
desc="Option shown in printer drop-down list to allow the user to print using cloud print. Cloud print dialog will open when this option is selected and the user clicks print.">
- Print with <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph>
+ Print with <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph>
</message>
<message name="IDS_PRINT_PREVIEW_PRINT_WITH_CLOUD_PRINT_WAIT"
desc="Message shown in the print preview page after choosing cloud print before the dialog displays">
- Loading <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph>
+ Loading <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph>
</message>
<message name="IDS_PRINT_PREVIEW_SUMMARY_FORMAT_LONG" desc="Print summary, explaining to the user how many pages will be printed.">
Total: <ph name="NUMBER_OF_SHEETS">$1<ex>10</ex></ph> <ph name="SHEETS_LABEL">$2<ex>sheets of paper</ex></ph> (<ph name="NUMBER_OF_PAGES">$3<ex>4</ex></ph> <ph name="PAGE_OR_PAGES_LABEL">$4<ex>Pages</ex></ph>)
@@ -6609,7 +6609,7 @@ The following plug-in is unresponsive: <ph name="PLUGIN_NAME">$1
Print using system dialog... <ph name="SHORTCUT_KEY">$1<ex>(Shift+Ctrl+P)</ex></ph>
</message>
<message name="IDS_PRINT_PREVIEW_CLOUD_DIALOG_OPTION" desc="Option allowing the user to access advanced printer settings using the cloud print dialog instead of printing through the print preview mechanism.">
- Print using <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> dialog... <ph name="SHORTCUT_KEY">$1<ex>(Shift+Ctrl+P)</ex></ph>
+ Print using <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph> dialog... <ph name="SHORTCUT_KEY">$2<ex>(Shift+Ctrl+P)</ex></ph>
</message>
<message name="IDS_PRINT_PREVIEW_PAGE_RANGE_INSTRUCTION" desc="Instruction shown when the user enters an invalid page range.">
Invalid page range, use <ph name="EXAMPLE_PAGE_RANGE">$1<ex>e.g. 1-5, 8, 11-13</ex></ph>
@@ -8661,23 +8661,26 @@ experiment id: "<ph name="EXPERIMENT_ID">$5<ex>ar1</ex></ph>"
Your network proxy settings are being managed by an extension.
</message>
- <message name="IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_LABEL" desc="The label of the cloud print setup button when it hasn't been set up yet.">
- <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> lets you access this computer's printers from anywhere. Sign in to enable.
+ <message name="IDS_GOOGLE_CLOUD_PRINT" desc="The name of the Google Cloud Print product.">
+ Google Cloud Print
</message>
- <message name="IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_BUTTON" desc="The label of the cloud proxy configure button when it hasn't been set up yet.">
- Sign in to <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph>
+ <message name="IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_DISABLED_LABEL" desc="The label of the cloud print setup button when it hasn't been set up yet.">
+ <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph> lets you access this computer's printers from anywhere. Click to enable.
</message>
- <message name="IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLED_LABEL" desc="The label of the cloud print setup button when it has been set up.">
- You have registered your printers with <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> using the account <ph name="EMAIL">$1<ex>foo@bar.com</ex></ph>
+ <message name="IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_DISABLED_BUTTON" desc="The label of the cloud connector configure button when it hasn't been set up yet.">
+ Enable <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph> Connector
</message>
- <message name="IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLED_BUTTON" desc="The label of the cloud proxy configure button when it has been set up.">
- Disable <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph>
+ <message name="IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLED_LABEL" desc="The label of the cloud print setup button when it has been set up.">
+ You have registered your printers with <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph> using the account <ph name="EMAIL">$2<ex>foo@bar.com</ex></ph>
</message>
- <message name="IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLED_MANAGE_BUTTON" desc="The label of the link item for the cloud print management URL.">
+ <message name="IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLED_BUTTON" desc="The label of the cloud print connector configure button when it has been set up.">
+ Disable <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph> Connector
+ </message>
+ <message name="IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLED_MANAGE_BUTTON" desc="The label of the link item for the cloud print management URL.">
Manage Print Settings...
</message>
- <message name="IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLING_BUTTON" desc="The label of the cloud proxy configure button while it is being set up.">
- Signing in...
+ <message name="IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLING_BUTTON" desc="The label of the cloud connector configure button while it is being set up.">
+ Enabling...
</message>
<message name="IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION" desc="The label of the 'Enable phishing and malware protection' checkbox">
Enable phishing and malware protection
@@ -9772,9 +9775,6 @@ Some features may be unavailable. Please check that the profile exists and you
<message name="IDS_OPTIONS_ADVANCED_SECTION_TITLE_TRANSLATE">
Translate
</message>
- <message name="IDS_OPTIONS_ADVANCED_SECTION_TITLE_CLOUD_PRINT">
- <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph>
- </message>
<message name="IDS_OPTIONS_ADVANCED_SECTION_TITLE_BACKGROUND">
Background Apps
</message>
@@ -14529,7 +14529,7 @@ Battery full
<!-- Cloud Print Strings -->
<message name="IDS_CLOUD_PRINT_TOKEN_EXPIRED_MESSAGE" desc="The message to display when the cloud print token has expired.">
- The credentials used to share your printers to <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> have expired. Please click here to re-enter your username and password.
+ The credentials used to share your printers to <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph> have expired. Please click here to re-enter your username and password.
</message>
<!-- Strings for the new-style OAuth-based enterprise enrollment page -->
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 958328f..dcb685d 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -137,8 +137,8 @@ const Experiment kExperiments[] = {
},
{
"cloud-print-proxy", // FLAGS:RECORD_UMA
- IDS_FLAGS_CLOUD_PRINT_PROXY_NAME,
- IDS_FLAGS_CLOUD_PRINT_PROXY_DESCRIPTION,
+ IDS_FLAGS_CLOUD_PRINT_CONNECTOR_NAME,
+ IDS_FLAGS_CLOUD_PRINT_CONNECTOR_DESCRIPTION,
// For a Chrome build, we know we have a PDF plug-in on Windows, so it's
// fully enabled.
// Otherwise, where we know Windows could be working if a viable PDF
diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc
index 55984e1..35b0da8 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc
+++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc
@@ -30,9 +30,6 @@
using content::BrowserThread;
-// TODO(sanjeevr): Localize the product name?
-const char kCloudPrintProductName[] = "Google Cloud Print";
-
class CloudPrintProxyService::TokenExpiredNotificationDelegate
: public NotificationDelegate {
public:
@@ -122,9 +119,9 @@ bool CloudPrintProxyService::ShowTokenExpiredNotification() {
// TODO(sanjeevr): Get icon for this notification.
GURL icon_url;
- string16 title = UTF8ToUTF16(kCloudPrintProductName);
+ string16 title = l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT);
string16 message =
- l10n_util::GetStringUTF16(IDS_CLOUD_PRINT_TOKEN_EXPIRED_MESSAGE);
+ l10n_util::GetStringFUTF16(IDS_CLOUD_PRINT_TOKEN_EXPIRED_MESSAGE, title);
string16 content_url = DesktopNotificationService::CreateDataUrl(
icon_url, title, message, WebKit::WebTextDirectionDefault);
token_expired_delegate_ = new TokenExpiredNotificationDelegate(this);
diff --git a/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc b/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc
index 097829a..695df1c7 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc
+++ b/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc
@@ -183,7 +183,8 @@ void CloudPrintSetupFlow::OnCloseContents(TabContents* source,
}
string16 CloudPrintSetupFlow::GetDialogTitle() const {
- return l10n_util::GetStringUTF16(IDS_CLOUD_PRINT_SETUP_DIALOG_TITLE);
+ return l10n_util::GetStringFUTF16(IDS_CLOUD_PRINT_SETUP_DIALOG_TITLE,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT));
}
bool CloudPrintSetupFlow::IsDialogModal() const {
diff --git a/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc b/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc
index a2de479..cbafd16 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc
+++ b/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc
@@ -54,7 +54,9 @@ void CloudPrintSetupSource::StartDataRequest(const std::string& path_raw,
std::string response;
if (path_raw == kCloudPrintSetupPath) {
- AddString(dict, "header", IDS_CLOUD_PRINT_SETUP_HEADER);
+ dict->SetString("header",
+ l10n_util::GetStringFUTF16(IDS_CLOUD_PRINT_SETUP_HEADER,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
AddString(dict, "explain", IDS_CLOUD_PRINT_SETUP_EXPLAIN);
AddString(dict, "anywhereheader", IDS_CLOUD_PRINT_SETUP_ANYWHERE_HEADER);
AddString(dict, "anywhereexplain", IDS_CLOUD_PRINT_SETUP_ANYWHERE_EXPLAIN);
diff --git a/chrome/browser/resources/options/advanced_options.html b/chrome/browser/resources/options/advanced_options.html
index 525eb99..99c613c 100644
--- a/chrome/browser/resources/options/advanced_options.html
+++ b/chrome/browser/resources/options/advanced_options.html
@@ -185,22 +185,22 @@
</div>
</section>
<if expr="not pp_ifdef('chromeos')">
- <section id="cloud-print-proxy-section">
+ <section id="cloud-print-connector-section">
<h3 i18n-content="advancedSectionTitleCloudPrint"></h3>
<div>
- <div id="cloudPrintProxyLabel"
- i18n-content="cloudPrintProxyDisabledLabel"></div>
+ <div id="cloudPrintConnectorLabel"
+ i18n-content="cloudPrintConnectorDisabledLabel"></div>
<div class="section-group">
- <button id="cloudPrintProxySetupButton"
- i18n-content="cloudPrintProxyDisabledButton"></button>
- <button id="cloudPrintProxyManageButton"
- i18n-content="cloudPrintProxyEnabledManageButton"></button>
+ <button id="cloudPrintConnectorSetupButton"
+ i18n-content="cloudPrintConnectorDisabledButton"></button>
+ <button id="cloudPrintManageButton"
+ i18n-content="cloudPrintConnectorEnabledManageButton"></button>
</div>
</div>
</section>
</if>
<if expr="pp_ifdef('chromeos')">
- <section id="cloud-print-proxy-section">
+ <section id="cloud-print-connector-section">
<h3 i18n-content="advancedSectionTitleCloudPrint"></h3>
<div>
<div>
@@ -211,7 +211,7 @@
i18n-values="href:cloudPrintLearnMoreURL"></a>
</div>
<div class="section-group">
- <button id="cloudPrintProxyManageButton"
+ <button id="cloudPrintManageButton"
i18n-content="cloudPrintChromeosOptionButton"></button>
</div>
</div>
diff --git a/chrome/browser/resources/options/advanced_options.js b/chrome/browser/resources/options/advanced_options.js
index fb1a809..846202d 100644
--- a/chrome/browser/resources/options/advanced_options.js
+++ b/chrome/browser/resources/options/advanced_options.js
@@ -114,19 +114,19 @@ var OptionsPage = options.OptionsPage;
// 'cloudPrintProxyEnabled' is true for Chrome branded builds on
// certain platforms, or could be enabled by a lab.
if (!cr.isChromeOS) {
- $('cloudPrintProxySetupButton').onclick = function(event) {
- if ($('cloudPrintProxyManageButton').style.display == 'none') {
+ $('cloudPrintConnectorSetupButton').onclick = function(event) {
+ if ($('cloudPrintManageButton').style.display == 'none') {
// Disable the button, set it's text to the intermediate state.
- $('cloudPrintProxySetupButton').textContent =
- localStrings.getString('cloudPrintProxyEnablingButton');
- $('cloudPrintProxySetupButton').disabled = true;
+ $('cloudPrintConnectorSetupButton').textContent =
+ localStrings.getString('cloudPrintConnectorEnablingButton');
+ $('cloudPrintConnectorSetupButton').disabled = true;
chrome.send('showCloudPrintSetupDialog');
} else {
- chrome.send('disableCloudPrintProxy');
+ chrome.send('disableCloudPrintConnector');
}
};
}
- $('cloudPrintProxyManageButton').onclick = function(event) {
+ $('cloudPrintManageButton').onclick = function(event) {
chrome.send('showCloudPrintManagePage');
};
@@ -233,28 +233,28 @@ var OptionsPage = options.OptionsPage;
};
// Set the Cloud Print proxy UI to enabled, disabled, or processing.
- AdvancedOptions.SetupCloudPrintProxySection = function(
+ AdvancedOptions.SetupCloudPrintConnectorSection = function(
disabled, label, allowed) {
if (!cr.isChromeOS) {
- $('cloudPrintProxyLabel').textContent = label;
+ $('cloudPrintConnectorLabel').textContent = label;
if (disabled || !allowed) {
- $('cloudPrintProxySetupButton').textContent =
- localStrings.getString('cloudPrintProxyDisabledButton');
- $('cloudPrintProxyManageButton').style.display = 'none';
+ $('cloudPrintConnectorSetupButton').textContent =
+ localStrings.getString('cloudPrintConnectorDisabledButton');
+ $('cloudPrintManageButton').style.display = 'none';
} else {
- $('cloudPrintProxySetupButton').textContent =
- localStrings.getString('cloudPrintProxyEnabledButton');
- $('cloudPrintProxyManageButton').style.display = 'inline';
+ $('cloudPrintConnectorSetupButton').textContent =
+ localStrings.getString('cloudPrintConnectorEnabledButton');
+ $('cloudPrintManageButton').style.display = 'inline';
}
- $('cloudPrintProxySetupButton').disabled = !allowed;
+ $('cloudPrintConnectorSetupButton').disabled = !allowed;
}
};
- AdvancedOptions.RemoveCloudPrintProxySection = function() {
+ AdvancedOptions.RemoveCloudPrintConnectorSection = function() {
if (!cr.isChromeOS) {
- var proxySectionElm = $('cloud-print-proxy-section');
- if (proxySectionElm)
- proxySectionElm.parentNode.removeChild(proxySectionElm);
+ var connectorSectionElm = $('cloud-print-connector-section');
+ if (connectorSectionElm)
+ connectorSectionElm.parentNode.removeChild(connectorSectionElm);
}
};
diff --git a/chrome/browser/resources/options2/advanced_options.html b/chrome/browser/resources/options2/advanced_options.html
index 525eb99..99c613c 100644
--- a/chrome/browser/resources/options2/advanced_options.html
+++ b/chrome/browser/resources/options2/advanced_options.html
@@ -185,22 +185,22 @@
</div>
</section>
<if expr="not pp_ifdef('chromeos')">
- <section id="cloud-print-proxy-section">
+ <section id="cloud-print-connector-section">
<h3 i18n-content="advancedSectionTitleCloudPrint"></h3>
<div>
- <div id="cloudPrintProxyLabel"
- i18n-content="cloudPrintProxyDisabledLabel"></div>
+ <div id="cloudPrintConnectorLabel"
+ i18n-content="cloudPrintConnectorDisabledLabel"></div>
<div class="section-group">
- <button id="cloudPrintProxySetupButton"
- i18n-content="cloudPrintProxyDisabledButton"></button>
- <button id="cloudPrintProxyManageButton"
- i18n-content="cloudPrintProxyEnabledManageButton"></button>
+ <button id="cloudPrintConnectorSetupButton"
+ i18n-content="cloudPrintConnectorDisabledButton"></button>
+ <button id="cloudPrintManageButton"
+ i18n-content="cloudPrintConnectorEnabledManageButton"></button>
</div>
</div>
</section>
</if>
<if expr="pp_ifdef('chromeos')">
- <section id="cloud-print-proxy-section">
+ <section id="cloud-print-connector-section">
<h3 i18n-content="advancedSectionTitleCloudPrint"></h3>
<div>
<div>
@@ -211,7 +211,7 @@
i18n-values="href:cloudPrintLearnMoreURL"></a>
</div>
<div class="section-group">
- <button id="cloudPrintProxyManageButton"
+ <button id="cloudPrintManageButton"
i18n-content="cloudPrintChromeosOptionButton"></button>
</div>
</div>
diff --git a/chrome/browser/resources/options2/advanced_options.js b/chrome/browser/resources/options2/advanced_options.js
index fb1a809..846202d 100644
--- a/chrome/browser/resources/options2/advanced_options.js
+++ b/chrome/browser/resources/options2/advanced_options.js
@@ -114,19 +114,19 @@ var OptionsPage = options.OptionsPage;
// 'cloudPrintProxyEnabled' is true for Chrome branded builds on
// certain platforms, or could be enabled by a lab.
if (!cr.isChromeOS) {
- $('cloudPrintProxySetupButton').onclick = function(event) {
- if ($('cloudPrintProxyManageButton').style.display == 'none') {
+ $('cloudPrintConnectorSetupButton').onclick = function(event) {
+ if ($('cloudPrintManageButton').style.display == 'none') {
// Disable the button, set it's text to the intermediate state.
- $('cloudPrintProxySetupButton').textContent =
- localStrings.getString('cloudPrintProxyEnablingButton');
- $('cloudPrintProxySetupButton').disabled = true;
+ $('cloudPrintConnectorSetupButton').textContent =
+ localStrings.getString('cloudPrintConnectorEnablingButton');
+ $('cloudPrintConnectorSetupButton').disabled = true;
chrome.send('showCloudPrintSetupDialog');
} else {
- chrome.send('disableCloudPrintProxy');
+ chrome.send('disableCloudPrintConnector');
}
};
}
- $('cloudPrintProxyManageButton').onclick = function(event) {
+ $('cloudPrintManageButton').onclick = function(event) {
chrome.send('showCloudPrintManagePage');
};
@@ -233,28 +233,28 @@ var OptionsPage = options.OptionsPage;
};
// Set the Cloud Print proxy UI to enabled, disabled, or processing.
- AdvancedOptions.SetupCloudPrintProxySection = function(
+ AdvancedOptions.SetupCloudPrintConnectorSection = function(
disabled, label, allowed) {
if (!cr.isChromeOS) {
- $('cloudPrintProxyLabel').textContent = label;
+ $('cloudPrintConnectorLabel').textContent = label;
if (disabled || !allowed) {
- $('cloudPrintProxySetupButton').textContent =
- localStrings.getString('cloudPrintProxyDisabledButton');
- $('cloudPrintProxyManageButton').style.display = 'none';
+ $('cloudPrintConnectorSetupButton').textContent =
+ localStrings.getString('cloudPrintConnectorDisabledButton');
+ $('cloudPrintManageButton').style.display = 'none';
} else {
- $('cloudPrintProxySetupButton').textContent =
- localStrings.getString('cloudPrintProxyEnabledButton');
- $('cloudPrintProxyManageButton').style.display = 'inline';
+ $('cloudPrintConnectorSetupButton').textContent =
+ localStrings.getString('cloudPrintConnectorEnabledButton');
+ $('cloudPrintManageButton').style.display = 'inline';
}
- $('cloudPrintProxySetupButton').disabled = !allowed;
+ $('cloudPrintConnectorSetupButton').disabled = !allowed;
}
};
- AdvancedOptions.RemoveCloudPrintProxySection = function() {
+ AdvancedOptions.RemoveCloudPrintConnectorSection = function() {
if (!cr.isChromeOS) {
- var proxySectionElm = $('cloud-print-proxy-section');
- if (proxySectionElm)
- proxySectionElm.parentNode.removeChild(proxySectionElm);
+ var connectorSectionElm = $('cloud-print-connector-section');
+ if (connectorSectionElm)
+ connectorSectionElm.parentNode.removeChild(connectorSectionElm);
}
};
diff --git a/chrome/browser/ui/webui/options/advanced_options_handler.cc b/chrome/browser/ui/webui/options/advanced_options_handler.cc
index 962b4ef..a32f584 100644
--- a/chrome/browser/ui/webui/options/advanced_options_handler.cc
+++ b/chrome/browser/ui/webui/options/advanced_options_handler.cc
@@ -55,12 +55,13 @@ AdvancedOptionsHandler::AdvancedOptionsHandler() {
// On Windows, we need the PDF plugin which is only guaranteed to exist on
// Google Chrome builds. Use a command-line switch for Windows non-Google
// Chrome builds.
- cloud_print_proxy_ui_enabled_ = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableCloudPrintProxy);
+ cloud_print_connector_ui_enabled_ =
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableCloudPrintProxy);
#elif(!defined(OS_CHROMEOS))
// Always enabled for Mac, Linux and Google Chrome Windows builds.
// Never enabled for Chrome OS, we don't even need to indicate it.
- cloud_print_proxy_ui_enabled_ = true;
+ cloud_print_connector_ui_enabled_ = true;
#endif
}
@@ -158,27 +159,13 @@ void AdvancedOptionsHandler::GetLocalizedValues(
IDS_OPTIONS_IMPROVE_BROWSING_EXPERIENCE },
{ "disableWebServices",
IDS_OPTIONS_DISABLE_WEB_SERVICES },
-#if defined(OS_CHROMEOS)
- { "cloudPrintChromeosOptionLabel",
- IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL },
- { "cloudPrintChromeosOptionButton",
- IDS_CLOUD_PRINT_CHROMEOS_OPTION_BUTTON },
-#endif
- { "cloudPrintOptionsStaticLabel",
- IDS_CLOUD_PRINT_SETUP_DIALOG_TITLE },
- { "cloudPrintProxyEnabledManageButton",
- IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLED_MANAGE_BUTTON },
{ "advancedSectionTitleCloudPrint",
- IDS_OPTIONS_ADVANCED_SECTION_TITLE_CLOUD_PRINT },
+ IDS_GOOGLE_CLOUD_PRINT },
#if !defined(OS_CHROMEOS)
- { "cloudPrintProxyDisabledLabel",
- IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_LABEL },
- { "cloudPrintProxyDisabledButton",
- IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_BUTTON },
- { "cloudPrintProxyEnabledButton",
- IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLED_BUTTON },
- { "cloudPrintProxyEnablingButton",
- IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLING_BUTTON },
+ { "cloudPrintConnectorEnabledManageButton",
+ IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLED_MANAGE_BUTTON},
+ { "cloudPrintConnectorEnablingButton",
+ IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLING_BUTTON },
#endif
#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
{ "advancedSectionTitleBackground",
@@ -189,6 +176,7 @@ void AdvancedOptionsHandler::GetLocalizedValues(
};
RegisterStrings(localized_strings, resources, arraysize(resources));
+ RegisterCloudPrintStrings(localized_strings);
RegisterTitle(localized_strings, "advancedPage",
IDS_OPTIONS_ADVANCED_TAB_LABEL);
@@ -203,6 +191,33 @@ void AdvancedOptionsHandler::GetLocalizedValues(
#endif
}
+void AdvancedOptionsHandler::RegisterCloudPrintStrings(
+ DictionaryValue* localized_strings) {
+#if defined(OS_CHROMEOS)
+ localized_strings->SetString("cloudPrintChromeosOptionLabel",
+ l10n_util::GetStringFUTF16(
+ IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
+ localized_strings->SetString("cloudPrintChromeosOptionButton",
+ l10n_util::GetStringFUTF16(
+ IDS_CLOUD_PRINT_CHROMEOS_OPTION_BUTTON,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
+#else
+ localized_strings->SetString("cloudPrintConnectorDisabledLabel",
+ l10n_util::GetStringFUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_DISABLED_LABEL,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
+ localized_strings->SetString("cloudPrintConnectorDisabledButton",
+ l10n_util::GetStringFUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_DISABLED_BUTTON,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
+ localized_strings->SetString("cloudPrintConnectorEnabledButton",
+ l10n_util::GetStringFUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLED_BUTTON,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
+#endif
+}
+
void AdvancedOptionsHandler::Initialize() {
DCHECK(web_ui_);
SetupMetricsReportingCheckbox();
@@ -213,11 +228,11 @@ void AdvancedOptionsHandler::Initialize() {
SetupProxySettingsSection();
SetupSSLConfigSettings();
#if !defined(OS_CHROMEOS)
- if (cloud_print_proxy_ui_enabled_) {
- SetupCloudPrintProxySection();
+ if (cloud_print_connector_ui_enabled_) {
+ SetupCloudPrintConnectorSection();
RefreshCloudPrintStatusFromService();
} else {
- RemoveCloudPrintProxySection();
+ RemoveCloudPrintConnectorSection();
}
#endif
#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
@@ -237,8 +252,10 @@ WebUIMessageHandler* AdvancedOptionsHandler::Attach(WebUI* web_ui) {
#if !defined(OS_CHROMEOS)
enable_metrics_recording_.Init(prefs::kMetricsReportingEnabled,
g_browser_process->local_state(), this);
- cloud_print_proxy_email_.Init(prefs::kCloudPrintEmail, prefs, this);
- cloud_print_proxy_enabled_.Init(prefs::kCloudPrintProxyEnabled, prefs, this);
+ cloud_print_connector_email_.Init(prefs::kCloudPrintEmail, prefs, this);
+ cloud_print_connector_enabled_.Init(prefs::kCloudPrintProxyEnabled,
+ prefs,
+ this);
#endif
rev_checking_enabled_.Init(prefs::kCertRevocationCheckingEnabled,
@@ -291,12 +308,12 @@ void AdvancedOptionsHandler::RegisterMessages() {
base::Bind(&AdvancedOptionsHandler::ShowCloudPrintManagePage,
base::Unretained(this)));
#if !defined(OS_CHROMEOS)
- if (cloud_print_proxy_ui_enabled_) {
+ if (cloud_print_connector_ui_enabled_) {
web_ui_->RegisterMessageCallback("showCloudPrintSetupDialog",
base::Bind(&AdvancedOptionsHandler::ShowCloudPrintSetupDialog,
base::Unretained(this)));
- web_ui_->RegisterMessageCallback("disableCloudPrintProxy",
- base::Bind(&AdvancedOptionsHandler::HandleDisableCloudPrintProxy,
+ web_ui_->RegisterMessageCallback("disableCloudPrintConnector",
+ base::Bind(&AdvancedOptionsHandler::HandleDisableCloudPrintConnector,
base::Unretained(this)));
}
web_ui_->RegisterMessageCallback("showNetworkProxySettings",
@@ -328,8 +345,8 @@ void AdvancedOptionsHandler::Observe(
} else if ((*pref_name == prefs::kCloudPrintEmail) ||
(*pref_name == prefs::kCloudPrintProxyEnabled)) {
#if !defined(OS_CHROMEOS)
- if (cloud_print_proxy_ui_enabled_)
- SetupCloudPrintProxySection();
+ if (cloud_print_connector_ui_enabled_)
+ SetupCloudPrintConnectorSection();
#endif
} else if (*pref_name == prefs::kWebKitDefaultFontSize) {
SetupFontSizeSelector();
@@ -364,8 +381,8 @@ void AdvancedOptionsHandler::FileSelected(const FilePath& path, int index,
void AdvancedOptionsHandler::OnCloudPrintSetupClosed() {
#if !defined(OS_CHROMEOS)
- if (cloud_print_proxy_ui_enabled_)
- SetupCloudPrintProxySection();
+ if (cloud_print_connector_ui_enabled_)
+ SetupCloudPrintConnectorSection();
#endif
}
@@ -473,7 +490,7 @@ void AdvancedOptionsHandler::ShowCloudPrintSetupDialog(const ListValue* args) {
GURL(), CURRENT_TAB, content::PAGE_TRANSITION_LINK);
}
-void AdvancedOptionsHandler::HandleDisableCloudPrintProxy(
+void AdvancedOptionsHandler::HandleDisableCloudPrintConnector(
const ListValue* args) {
content::RecordAction(
UserMetricsAction("Options_DisableCloudPrintProxy"));
@@ -482,49 +499,52 @@ void AdvancedOptionsHandler::HandleDisableCloudPrintProxy(
}
void AdvancedOptionsHandler::RefreshCloudPrintStatusFromService() {
- if (cloud_print_proxy_ui_enabled_)
+ if (cloud_print_connector_ui_enabled_)
CloudPrintProxyServiceFactory::GetForProfile(Profile::FromWebUI(web_ui_))->
RefreshStatusFromService();
}
-void AdvancedOptionsHandler::SetupCloudPrintProxySection() {
+void AdvancedOptionsHandler::SetupCloudPrintConnectorSection() {
Profile* profile = Profile::FromWebUI(web_ui_);
if (!CloudPrintProxyServiceFactory::GetForProfile(profile)) {
- cloud_print_proxy_ui_enabled_ = false;
- RemoveCloudPrintProxySection();
+ cloud_print_connector_ui_enabled_ = false;
+ RemoveCloudPrintConnectorSection();
return;
}
- bool cloud_print_proxy_allowed =
- !cloud_print_proxy_enabled_.IsManaged() ||
- cloud_print_proxy_enabled_.GetValue();
- base::FundamentalValue allowed(cloud_print_proxy_allowed);
+ bool cloud_print_connector_allowed =
+ !cloud_print_connector_enabled_.IsManaged() ||
+ cloud_print_connector_enabled_.GetValue();
+ base::FundamentalValue allowed(cloud_print_connector_allowed);
std::string email;
if (profile->GetPrefs()->HasPrefPath(prefs::kCloudPrintEmail) &&
- cloud_print_proxy_allowed) {
+ cloud_print_connector_allowed) {
email = profile->GetPrefs()->GetString(prefs::kCloudPrintEmail);
}
base::FundamentalValue disabled(email.empty());
string16 label_str;
if (email.empty()) {
- label_str = l10n_util::GetStringUTF16(
- IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_LABEL);
+ label_str = l10n_util::GetStringFUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_DISABLED_LABEL,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT));
} else {
label_str = l10n_util::GetStringFUTF16(
- IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLED_LABEL, UTF8ToUTF16(email));
+ IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLED_LABEL,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT),
+ UTF8ToUTF16(email));
}
StringValue label(label_str);
web_ui_->CallJavascriptFunction(
- "options.AdvancedOptions.SetupCloudPrintProxySection",
+ "options.AdvancedOptions.SetupCloudPrintConnectorSection",
disabled, label, allowed);
}
-void AdvancedOptionsHandler::RemoveCloudPrintProxySection() {
+void AdvancedOptionsHandler::RemoveCloudPrintConnectorSection() {
web_ui_->CallJavascriptFunction(
- "options.AdvancedOptions.RemoveCloudPrintProxySection");
+ "options.AdvancedOptions.RemoveCloudPrintConnectorSection");
}
#endif
diff --git a/chrome/browser/ui/webui/options/advanced_options_handler.h b/chrome/browser/ui/webui/options/advanced_options_handler.h
index 6696c1d..014e747 100644
--- a/chrome/browser/ui/webui/options/advanced_options_handler.h
+++ b/chrome/browser/ui/webui/options/advanced_options_handler.h
@@ -99,6 +99,9 @@ class AdvancedOptionsHandler
// tab pointed at the management URL.
void ShowCloudPrintManagePage(const ListValue* args);
+ // Register localized strings used by Cloud Print
+ void RegisterCloudPrintStrings(DictionaryValue* localized_strings);
+
#if !defined(OS_CHROMEOS)
// Callback for the Sign in to Cloud Print button. This will start
// the authentication process.
@@ -106,19 +109,18 @@ class AdvancedOptionsHandler
// Callback for the Disable Cloud Print button. This will sign out
// of cloud print.
- void HandleDisableCloudPrintProxy(const ListValue* args);
+ void HandleDisableCloudPrintConnector(const ListValue* args);
// Pings the service to send us it's current notion of the enabled state.
void RefreshCloudPrintStatusFromService();
- // Setup the enabled or disabled state of the cloud print proxy
+ // Setup the enabled or disabled state of the cloud print connector
// management UI.
- void SetupCloudPrintProxySection();
-
- // Remove cloud print proxy section if cloud print proxy management UI is
- // disabled.
- void RemoveCloudPrintProxySection();
+ void SetupCloudPrintConnectorSection();
+ // Remove cloud print connector section if cloud print connector management
+ // UI is disabled.
+ void RemoveCloudPrintConnectorSection();
#endif
#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
@@ -155,9 +157,9 @@ class AdvancedOptionsHandler
#if !defined(OS_CHROMEOS)
BooleanPrefMember enable_metrics_recording_;
- StringPrefMember cloud_print_proxy_email_;
- BooleanPrefMember cloud_print_proxy_enabled_;
- bool cloud_print_proxy_ui_enabled_;
+ StringPrefMember cloud_print_connector_email_;
+ BooleanPrefMember cloud_print_connector_enabled_;
+ bool cloud_print_connector_ui_enabled_;
scoped_ptr<CloudPrintSetupHandler> cloud_print_setup_handler_;
#endif
diff --git a/chrome/browser/ui/webui/options2/advanced_options_handler2.cc b/chrome/browser/ui/webui/options2/advanced_options_handler2.cc
index 1c1ea20..72e6f4c 100644
--- a/chrome/browser/ui/webui/options2/advanced_options_handler2.cc
+++ b/chrome/browser/ui/webui/options2/advanced_options_handler2.cc
@@ -57,12 +57,13 @@ AdvancedOptionsHandler::AdvancedOptionsHandler() {
// On Windows, we need the PDF plugin which is only guaranteed to exist on
// Google Chrome builds. Use a command-line switch for Windows non-Google
// Chrome builds.
- cloud_print_proxy_ui_enabled_ = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableCloudPrintProxy);
+ cloud_print_connector_ui_enabled_ =
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableCloudPrintProxy);
#elif(!defined(OS_CHROMEOS))
// Always enabled for Mac, Linux and Google Chrome Windows builds.
// Never enabled for Chrome OS, we don't even need to indicate it.
- cloud_print_proxy_ui_enabled_ = true;
+ cloud_print_connector_ui_enabled_ = true;
#endif
}
@@ -160,27 +161,13 @@ void AdvancedOptionsHandler::GetLocalizedValues(
IDS_OPTIONS_IMPROVE_BROWSING_EXPERIENCE },
{ "disableWebServices",
IDS_OPTIONS_DISABLE_WEB_SERVICES },
-#if defined(OS_CHROMEOS)
- { "cloudPrintChromeosOptionLabel",
- IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL },
- { "cloudPrintChromeosOptionButton",
- IDS_CLOUD_PRINT_CHROMEOS_OPTION_BUTTON },
-#endif
- { "cloudPrintOptionsStaticLabel",
- IDS_CLOUD_PRINT_SETUP_DIALOG_TITLE },
- { "cloudPrintProxyEnabledManageButton",
- IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLED_MANAGE_BUTTON },
{ "advancedSectionTitleCloudPrint",
- IDS_OPTIONS_ADVANCED_SECTION_TITLE_CLOUD_PRINT },
+ IDS_GOOGLE_CLOUD_PRINT },
#if !defined(OS_CHROMEOS)
- { "cloudPrintProxyDisabledLabel",
- IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_LABEL },
- { "cloudPrintProxyDisabledButton",
- IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_BUTTON },
- { "cloudPrintProxyEnabledButton",
- IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLED_BUTTON },
- { "cloudPrintProxyEnablingButton",
- IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLING_BUTTON },
+ { "cloudPrintConnectorEnabledManageButton",
+ IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLED_MANAGE_BUTTON},
+ { "cloudPrintConnectorEnablingButton",
+ IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLING_BUTTON },
#endif
#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
{ "advancedSectionTitleBackground",
@@ -191,6 +178,7 @@ void AdvancedOptionsHandler::GetLocalizedValues(
};
RegisterStrings(localized_strings, resources, arraysize(resources));
+ RegisterCloudPrintStrings(localized_strings);
RegisterTitle(localized_strings, "advancedPage",
IDS_OPTIONS_ADVANCED_TAB_LABEL);
@@ -205,6 +193,33 @@ void AdvancedOptionsHandler::GetLocalizedValues(
#endif
}
+void AdvancedOptionsHandler::RegisterCloudPrintStrings(
+ DictionaryValue* localized_strings) {
+#if defined(OS_CHROMEOS)
+ localized_strings->SetString("cloudPrintChromeosOptionLabel",
+ l10n_util::GetStringFUTF16(
+ IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
+ localized_strings->SetString("cloudPrintChromeosOptionButton",
+ l10n_util::GetStringFUTF16(
+ IDS_CLOUD_PRINT_CHROMEOS_OPTION_BUTTON,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
+#else
+ localized_strings->SetString("cloudPrintConnectorDisabledLabel",
+ l10n_util::GetStringFUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_DISABLED_LABEL,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
+ localized_strings->SetString("cloudPrintConnectorDisabledButton",
+ l10n_util::GetStringFUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_DISABLED_BUTTON,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
+ localized_strings->SetString("cloudPrintConnectorEnabledButton",
+ l10n_util::GetStringFUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLED_BUTTON,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
+#endif
+}
+
void AdvancedOptionsHandler::Initialize() {
DCHECK(web_ui_);
SetupMetricsReportingCheckbox();
@@ -215,11 +230,11 @@ void AdvancedOptionsHandler::Initialize() {
SetupProxySettingsSection();
SetupSSLConfigSettings();
#if !defined(OS_CHROMEOS)
- if (cloud_print_proxy_ui_enabled_) {
- SetupCloudPrintProxySection();
+ if (cloud_print_connector_ui_enabled_) {
+ SetupCloudPrintConnectorSection();
RefreshCloudPrintStatusFromService();
} else {
- RemoveCloudPrintProxySection();
+ RemoveCloudPrintConnectorSection();
}
#endif
#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
@@ -239,8 +254,10 @@ WebUIMessageHandler* AdvancedOptionsHandler::Attach(WebUI* web_ui) {
#if !defined(OS_CHROMEOS)
enable_metrics_recording_.Init(prefs::kMetricsReportingEnabled,
g_browser_process->local_state(), this);
- cloud_print_proxy_email_.Init(prefs::kCloudPrintEmail, prefs, this);
- cloud_print_proxy_enabled_.Init(prefs::kCloudPrintProxyEnabled, prefs, this);
+ cloud_print_connector_email_.Init(prefs::kCloudPrintEmail, prefs, this);
+ cloud_print_connector_enabled_.Init(prefs::kCloudPrintProxyEnabled,
+ prefs,
+ this);
#endif
rev_checking_enabled_.Init(prefs::kCertRevocationCheckingEnabled,
@@ -293,12 +310,12 @@ void AdvancedOptionsHandler::RegisterMessages() {
base::Bind(&AdvancedOptionsHandler::ShowCloudPrintManagePage,
base::Unretained(this)));
#if !defined(OS_CHROMEOS)
- if (cloud_print_proxy_ui_enabled_) {
+ if (cloud_print_connector_ui_enabled_) {
web_ui_->RegisterMessageCallback("showCloudPrintSetupDialog",
base::Bind(&AdvancedOptionsHandler::ShowCloudPrintSetupDialog,
base::Unretained(this)));
- web_ui_->RegisterMessageCallback("disableCloudPrintProxy",
- base::Bind(&AdvancedOptionsHandler::HandleDisableCloudPrintProxy,
+ web_ui_->RegisterMessageCallback("disableCloudPrintConnector",
+ base::Bind(&AdvancedOptionsHandler::HandleDisableCloudPrintConnector,
base::Unretained(this)));
}
web_ui_->RegisterMessageCallback("showNetworkProxySettings",
@@ -330,8 +347,8 @@ void AdvancedOptionsHandler::Observe(
} else if ((*pref_name == prefs::kCloudPrintEmail) ||
(*pref_name == prefs::kCloudPrintProxyEnabled)) {
#if !defined(OS_CHROMEOS)
- if (cloud_print_proxy_ui_enabled_)
- SetupCloudPrintProxySection();
+ if (cloud_print_connector_ui_enabled_)
+ SetupCloudPrintConnectorSection();
#endif
} else if (*pref_name == prefs::kWebKitDefaultFontSize) {
SetupFontSizeSelector();
@@ -366,8 +383,8 @@ void AdvancedOptionsHandler::FileSelected(const FilePath& path, int index,
void AdvancedOptionsHandler::OnCloudPrintSetupClosed() {
#if !defined(OS_CHROMEOS)
- if (cloud_print_proxy_ui_enabled_)
- SetupCloudPrintProxySection();
+ if (cloud_print_connector_ui_enabled_)
+ SetupCloudPrintConnectorSection();
#endif
}
@@ -475,7 +492,7 @@ void AdvancedOptionsHandler::ShowCloudPrintSetupDialog(const ListValue* args) {
GURL(), CURRENT_TAB, content::PAGE_TRANSITION_LINK);
}
-void AdvancedOptionsHandler::HandleDisableCloudPrintProxy(
+void AdvancedOptionsHandler::HandleDisableCloudPrintConnector(
const ListValue* args) {
content::RecordAction(
UserMetricsAction("Options_DisableCloudPrintProxy"));
@@ -484,49 +501,52 @@ void AdvancedOptionsHandler::HandleDisableCloudPrintProxy(
}
void AdvancedOptionsHandler::RefreshCloudPrintStatusFromService() {
- if (cloud_print_proxy_ui_enabled_)
+ if (cloud_print_connector_ui_enabled_)
CloudPrintProxyServiceFactory::GetForProfile(Profile::FromWebUI(web_ui_))->
RefreshStatusFromService();
}
-void AdvancedOptionsHandler::SetupCloudPrintProxySection() {
+void AdvancedOptionsHandler::SetupCloudPrintConnectorSection() {
Profile* profile = Profile::FromWebUI(web_ui_);
if (!CloudPrintProxyServiceFactory::GetForProfile(profile)) {
- cloud_print_proxy_ui_enabled_ = false;
- RemoveCloudPrintProxySection();
+ cloud_print_connector_ui_enabled_ = false;
+ RemoveCloudPrintConnectorSection();
return;
}
- bool cloud_print_proxy_allowed =
- !cloud_print_proxy_enabled_.IsManaged() ||
- cloud_print_proxy_enabled_.GetValue();
- base::FundamentalValue allowed(cloud_print_proxy_allowed);
+ bool cloud_print_connector_allowed =
+ !cloud_print_connector_enabled_.IsManaged() ||
+ cloud_print_connector_enabled_.GetValue();
+ base::FundamentalValue allowed(cloud_print_connector_allowed);
std::string email;
if (profile->GetPrefs()->HasPrefPath(prefs::kCloudPrintEmail) &&
- cloud_print_proxy_allowed) {
+ cloud_print_connector_allowed) {
email = profile->GetPrefs()->GetString(prefs::kCloudPrintEmail);
}
base::FundamentalValue disabled(email.empty());
string16 label_str;
if (email.empty()) {
- label_str = l10n_util::GetStringUTF16(
- IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_LABEL);
+ label_str = l10n_util::GetStringFUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_DISABLED_LABEL,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT));
} else {
label_str = l10n_util::GetStringFUTF16(
- IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLED_LABEL, UTF8ToUTF16(email));
+ IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_ENABLED_LABEL,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT),
+ UTF8ToUTF16(email));
}
StringValue label(label_str);
web_ui_->CallJavascriptFunction(
- "options.AdvancedOptions.SetupCloudPrintProxySection",
+ "options.AdvancedOptions.SetupCloudPrintConnectorSection",
disabled, label, allowed);
}
-void AdvancedOptionsHandler::RemoveCloudPrintProxySection() {
+void AdvancedOptionsHandler::RemoveCloudPrintConnectorSection() {
web_ui_->CallJavascriptFunction(
- "options.AdvancedOptions.RemoveCloudPrintProxySection");
+ "options.AdvancedOptions.RemoveCloudPrintConnectorSection");
}
#endif
diff --git a/chrome/browser/ui/webui/options2/advanced_options_handler2.h b/chrome/browser/ui/webui/options2/advanced_options_handler2.h
index da4eaed..3de0c53 100644
--- a/chrome/browser/ui/webui/options2/advanced_options_handler2.h
+++ b/chrome/browser/ui/webui/options2/advanced_options_handler2.h
@@ -101,6 +101,9 @@ class AdvancedOptionsHandler
// tab pointed at the management URL.
void ShowCloudPrintManagePage(const ListValue* args);
+ // Register localized strings used by Cloud Print
+ void RegisterCloudPrintStrings(DictionaryValue* localized_strings);
+
#if !defined(OS_CHROMEOS)
// Callback for the Sign in to Cloud Print button. This will start
// the authentication process.
@@ -108,19 +111,18 @@ class AdvancedOptionsHandler
// Callback for the Disable Cloud Print button. This will sign out
// of cloud print.
- void HandleDisableCloudPrintProxy(const ListValue* args);
+ void HandleDisableCloudPrintConnector(const ListValue* args);
// Pings the service to send us it's current notion of the enabled state.
void RefreshCloudPrintStatusFromService();
- // Setup the enabled or disabled state of the cloud print proxy
+ // Setup the enabled or disabled state of the cloud print connector
// management UI.
- void SetupCloudPrintProxySection();
-
- // Remove cloud print proxy section if cloud print proxy management UI is
- // disabled.
- void RemoveCloudPrintProxySection();
+ void SetupCloudPrintConnectorSection();
+ // Remove cloud print connector section if cloud print connector management
+ // UI is disabled.
+ void RemoveCloudPrintConnectorSection();
#endif
#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
@@ -157,9 +159,9 @@ class AdvancedOptionsHandler
#if !defined(OS_CHROMEOS)
BooleanPrefMember enable_metrics_recording_;
- StringPrefMember cloud_print_proxy_email_;
- BooleanPrefMember cloud_print_proxy_enabled_;
- bool cloud_print_proxy_ui_enabled_;
+ StringPrefMember cloud_print_connector_email_;
+ BooleanPrefMember cloud_print_connector_enabled_;
+ bool cloud_print_connector_ui_enabled_;
scoped_ptr<CloudPrintSetupHandler> cloud_print_setup_handler_;
#endif
diff --git a/chrome/browser/ui/webui/print_preview_data_source.cc b/chrome/browser/ui/webui/print_preview_data_source.cc
index 4b9607c..3ab9db9 100644
--- a/chrome/browser/ui/webui/print_preview_data_source.cc
+++ b/chrome/browser/ui/webui/print_preview_data_source.cc
@@ -101,6 +101,7 @@ void PrintPreviewDataSource::Init(bool is_dummy) {
#if defined(OS_CHROMEOS)
AddString("cloudPrintDialogOption", l10n_util::GetStringFUTF16(
IDS_PRINT_PREVIEW_CLOUD_DIALOG_OPTION,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT),
shortcut_text));
AddLocalizedString("printWithCloudPrint",
IDS_PRINT_PREVIEW_MORE_PRINTERS);
@@ -108,20 +109,22 @@ void PrintPreviewDataSource::Init(bool is_dummy) {
AddString("systemDialogOption", l10n_util::GetStringFUTF16(
IDS_PRINT_PREVIEW_SYSTEM_DIALOG_OPTION,
shortcut_text));
- AddLocalizedString("printWithCloudPrint",
- IDS_PRINT_PREVIEW_PRINT_WITH_CLOUD_PRINT);
+ AddString("printWithCloudPrint", l10n_util::GetStringFUTF16(
+ IDS_PRINT_PREVIEW_PRINT_WITH_CLOUD_PRINT,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
#endif
#if defined(OS_MACOSX)
AddLocalizedString("openPdfInPreviewOption",
IDS_PRINT_PREVIEW_OPEN_PDF_IN_PREVIEW_APP);
#endif
+ AddString("printWithCloudPrintWait", l10n_util::GetStringFUTF16(
+ IDS_PRINT_PREVIEW_PRINT_WITH_CLOUD_PRINT_WAIT,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
AddLocalizedString("pageRangeInstruction",
IDS_PRINT_PREVIEW_PAGE_RANGE_INSTRUCTION);
AddLocalizedString("copiesInstruction", IDS_PRINT_PREVIEW_COPIES_INSTRUCTION);
AddLocalizedString("signIn", IDS_PRINT_PREVIEW_SIGN_IN);
AddLocalizedString("managePrinters", IDS_PRINT_PREVIEW_MANAGE_PRINTERS);
- AddLocalizedString("printWithCloudPrintWait",
- IDS_PRINT_PREVIEW_PRINT_WITH_CLOUD_PRINT_WAIT);
AddLocalizedString("incrementTitle", IDS_PRINT_PREVIEW_INCREMENT_TITLE);
AddLocalizedString("decrementTitle", IDS_PRINT_PREVIEW_DECREMENT_TITLE);
AddLocalizedString("printPagesLabel", IDS_PRINT_PREVIEW_PRINT_PAGES_LABEL);
diff --git a/chrome/service/cloud_print/cloud_print_connector.cc b/chrome/service/cloud_print/cloud_print_connector.cc
index a2b5f81..ec02d2a 100644
--- a/chrome/service/cloud_print/cloud_print_connector.cc
+++ b/chrome/service/cloud_print/cloud_print_connector.cc
@@ -168,7 +168,8 @@ CloudPrintConnector::HandlePrinterListResponse(
if (!result.succeeded()) {
std::string message = result.message();
if (message.empty())
- message = l10n_util::GetStringUTF8(IDS_CLOUD_PRINT_ENUM_FAILED);
+ message = l10n_util::GetStringFUTF8(IDS_CLOUD_PRINT_ENUM_FAILED,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT));
// There was a failure enumerating printers. Send a message to the server.
ReportUserMessage(kEnumPrintersFailedMessageId, message);
}
@@ -483,7 +484,8 @@ void CloudPrintConnector::OnReceivePrinterCaps(
string16 printer_name_utf16 = UTF8ToUTF16(printer_name);
std::string status_message = l10n_util::GetStringFUTF8(
IDS_CLOUD_PRINT_REGISTER_PRINTER_FAILED,
- printer_name_utf16);
+ printer_name_utf16,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT));
ReportUserMessage(kGetPrinterCapsFailedMessageId, status_message);
ContinuePendingTaskProcessing(); // Skip this printer registration.
diff --git a/chrome/service/cloud_print/print_system_win.cc b/chrome/service/cloud_print/print_system_win.cc
index d3bfc03..b72d0cb 100644
--- a/chrome/service/cloud_print/print_system_win.cc
+++ b/chrome/service/cloud_print/print_system_win.cc
@@ -729,8 +729,9 @@ PrintSystemWin::PrintSystemWin() {
PrintSystem::PrintSystemResult PrintSystemWin::Init() {
if (!printing::XPSModule::Init()) {
- std::string message = l10n_util::GetStringUTF8(
- IDS_CLOUD_PRINT_XPS_UNAVAILABLE);
+ std::string message = l10n_util::GetStringFUTF8(
+ IDS_CLOUD_PRINT_XPS_UNAVAILABLE,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT));
return PrintSystemResult(false, message);
}
return PrintSystemResult(true, std::string());
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc
index 4bd18a5..d2fa127 100644
--- a/chrome/service/service_process.cc
+++ b/chrome/service/service_process.cc
@@ -95,7 +95,8 @@ void PrepareRestartOnCrashEnviroment(
string16 dlg_strings(l10n_util::GetStringUTF16(IDS_CRASH_RECOVERY_TITLE));
dlg_strings.push_back('|');
string16 adjusted_string(
- l10n_util::GetStringUTF16(IDS_SERVICE_CRASH_RECOVERY_CONTENT));
+ l10n_util::GetStringFUTF16(IDS_SERVICE_CRASH_RECOVERY_CONTENT,
+ l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
base::i18n::AdjustStringForLocaleDirection(&adjusted_string);
dlg_strings.append(adjusted_string);
dlg_strings.push_back('|');