Commit 9dd9aad0 authored by abodenha@chromium.org's avatar abodenha@chromium.org

Revert 107748 - Add policy for blocking GCP printing.


BUG=101389
TEST=On any platform use the appropriate policy mechanism to set CloudPrintSubmitEnabled to false.  Cloud print should no longer be available via built in print mechanisms


Review URL: http://codereview.chromium.org/8395007

TBR=abodenha@chromium.org
Review URL: http://codereview.chromium.org/8416047

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107761 0039d316-1c4b-4281-b951-d872f2087c98
parent c4c50862
...@@ -1847,21 +1847,6 @@ ...@@ -1847,21 +1847,6 @@
'caption': '''Device-level network configuration''', 'caption': '''Device-level network configuration''',
'desc': '''Allows pushing network configuration to be applied for all useers of a <ph name="PRODUCT_OS_NAME">$2<ex>Chromium OS</ex></ph> device. The network configuration is a JSON-formatted string as defined by the Open Network Configuration format described at https://sites.google.com/a/chromium.org/dev/chromium-os/chromiumos-design-docs/open-network-configuration''', 'desc': '''Allows pushing network configuration to be applied for all useers of a <ph name="PRODUCT_OS_NAME">$2<ex>Chromium OS</ex></ph> device. The network configuration is a JSON-formatted string as defined by the Open Network Configuration format described at https://sites.google.com/a/chromium.org/dev/chromium-os/chromiumos-design-docs/open-network-configuration''',
}, },
{
'name': 'CloudPrintSubmitEnabled',
'type': 'main',
'supported_on': ['chrome.*:17-'],
'features': {'dynamic_refresh': 1},
'future': False,
'example_value': True,
'id': 109,
'caption': '''Enable submission of documents to <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph>''',
'desc': ''' Enables <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> to submit documents to <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> for printing. NOTE: This only affects <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> support in <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>. It does not prevent users from submitting print jobs on web sites.
If this setting is enabled or not configured, users can print to <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> from the <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> print dialog.
If this setting is disabled, users cannot print to <ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph> from the <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> print dialog''',
},
], ],
'messages': { 'messages': {
# Messages that are not associated to any policies. # Messages that are not associated to any policies.
......
...@@ -371,10 +371,7 @@ INSTANTIATE_TEST_CASE_P( ...@@ -371,10 +371,7 @@ INSTANTIATE_TEST_CASE_P(
testing::Values( testing::Values(
ValueTestParams::ForIntegerPolicy( ValueTestParams::ForIntegerPolicy(
kPolicyPolicyRefreshRate, kPolicyPolicyRefreshRate,
key::kPolicyRefreshRate), key::kPolicyRefreshRate)));
ValueTestParams::ForBooleanPolicy(
kPolicyCloudPrintSubmitEnabled,
key::kCloudPrintSubmitEnabled));
#endif #endif
} // namespace policy } // namespace policy
...@@ -443,8 +443,6 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { ...@@ -443,8 +443,6 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = {
prefs::kRemoteAccessHostFirewallTraversal }, prefs::kRemoteAccessHostFirewallTraversal },
{ Value::TYPE_BOOLEAN, kPolicyCloudPrintProxyEnabled, { Value::TYPE_BOOLEAN, kPolicyCloudPrintProxyEnabled,
prefs::kCloudPrintProxyEnabled }, prefs::kCloudPrintProxyEnabled },
{ Value::TYPE_BOOLEAN, kPolicyCloudPrintSubmitEnabled,
prefs::kCloudPrintSubmitEnabled },
{ Value::TYPE_BOOLEAN, kPolicyTranslateEnabled, prefs::kEnableTranslate }, { Value::TYPE_BOOLEAN, kPolicyTranslateEnabled, prefs::kEnableTranslate },
{ Value::TYPE_BOOLEAN, kPolicyAllowOutdatedPlugins, { Value::TYPE_BOOLEAN, kPolicyAllowOutdatedPlugins,
prefs::kPluginsAllowOutdated }, prefs::kPluginsAllowOutdated },
......
...@@ -210,8 +210,6 @@ INSTANTIATE_TEST_CASE_P( ...@@ -210,8 +210,6 @@ INSTANTIATE_TEST_CASE_P(
prefs::kRemoteAccessHostFirewallTraversal), prefs::kRemoteAccessHostFirewallTraversal),
TypeAndName(kPolicyCloudPrintProxyEnabled, TypeAndName(kPolicyCloudPrintProxyEnabled,
prefs::kCloudPrintProxyEnabled), prefs::kCloudPrintProxyEnabled),
TypeAndName(kPolicyCloudPrintSubmitEnabled,
prefs::kCloudPrintSubmitEnabled),
TypeAndName(kPolicySavingBrowserHistoryDisabled, TypeAndName(kPolicySavingBrowserHistoryDisabled,
prefs::kSavingBrowserHistoryDisabled), prefs::kSavingBrowserHistoryDisabled),
TypeAndName(kPolicySavingBrowserHistoryDisabled, TypeAndName(kPolicySavingBrowserHistoryDisabled,
......
...@@ -362,8 +362,6 @@ INSTANTIATE_TEST_CASE_P( ...@@ -362,8 +362,6 @@ INSTANTIATE_TEST_CASE_P(
testing::Values( testing::Values(
PolicyTestParams::ForListPolicy( PolicyTestParams::ForListPolicy(
kPolicyURLWhitelist, kPolicyURLWhitelist,
key::kURLWhitelist), key::kURLWhitelist)));
PolicyTestParams::ForBooleanPolicy(
kPolicyCloudPrintSubmitEnabled,
key::kCloudPrintSubmitEnabled)));
} // namespace policy } // namespace policy
...@@ -521,9 +521,6 @@ INSTANTIATE_TEST_CASE_P( ...@@ -521,9 +521,6 @@ INSTANTIATE_TEST_CASE_P(
testing::Values( testing::Values(
PolicyTestParams::ForListPolicy( PolicyTestParams::ForListPolicy(
kPolicyURLWhitelist, kPolicyURLWhitelist,
key::kURLWhitelist), key::kURLWhitelist)));
PolicyTestParams::ForBooleanPolicy(
kPolicyCloudPrintSubmitEnabled,
key::kCloudPrintSubmitEnabled)));
} // namespace policy } // namespace policy
...@@ -2402,9 +2402,6 @@ void Browser::RegisterUserPrefs(PrefService* prefs) { ...@@ -2402,9 +2402,6 @@ void Browser::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterBooleanPref(prefs::kCloudPrintProxyEnabled, prefs->RegisterBooleanPref(prefs::kCloudPrintProxyEnabled,
true, true,
PrefService::UNSYNCABLE_PREF); PrefService::UNSYNCABLE_PREF);
prefs->RegisterBooleanPref(prefs::kCloudPrintSubmitEnabled,
true,
PrefService::UNSYNCABLE_PREF);
prefs->RegisterBooleanPref(prefs::kDevToolsDisabled, prefs->RegisterBooleanPref(prefs::kDevToolsDisabled,
false, false,
PrefService::UNSYNCABLE_PREF); PrefService::UNSYNCABLE_PREF);
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include "base/values.h" #include "base/values.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/platform_util.h" #include "chrome/browser/platform_util.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/printing/background_printing_manager.h" #include "chrome/browser/printing/background_printing_manager.h"
#include "chrome/browser/printing/cloud_print/cloud_print_url.h" #include "chrome/browser/printing/cloud_print/cloud_print_url.h"
#include "chrome/browser/printing/print_dialog_cloud.h" #include "chrome/browser/printing/print_dialog_cloud.h"
...@@ -33,7 +32,6 @@ ...@@ -33,7 +32,6 @@
#include "chrome/browser/printing/print_system_task_proxy.h" #include "chrome/browser/printing/print_system_task_proxy.h"
#include "chrome/browser/printing/print_view_manager.h" #include "chrome/browser/printing/print_view_manager.h"
#include "chrome/browser/printing/printer_manager_dialog.h" #include "chrome/browser/printing/printer_manager_dialog.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/restore_tab_helper.h" #include "chrome/browser/sessions/restore_tab_helper.h"
#include "chrome/browser/tabs/tab_strip_model.h" #include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_list.h"
...@@ -41,7 +39,6 @@ ...@@ -41,7 +39,6 @@
#include "chrome/browser/ui/webui/cloud_print_signin_dialog.h" #include "chrome/browser/ui/webui/cloud_print_signin_dialog.h"
#include "chrome/browser/ui/webui/print_preview_ui.h" #include "chrome/browser/ui/webui/print_preview_ui.h"
#include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/print_messages.h" #include "chrome/common/print_messages.h"
#include "content/browser/renderer_host/render_view_host.h" #include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h" #include "content/browser/tab_contents/tab_contents.h"
...@@ -661,13 +658,10 @@ void PrintPreviewHandler::SetupPrinterList(const ListValue& printers) { ...@@ -661,13 +658,10 @@ void PrintPreviewHandler::SetupPrinterList(const ListValue& printers) {
} }
void PrintPreviewHandler::SendCloudPrintEnabled() { void PrintPreviewHandler::SendCloudPrintEnabled() {
Profile* profile = BrowserList::GetLastActive()->profile(); GURL gcp_url(CloudPrintURL(BrowserList::GetLastActive()->profile()).
PrefService* prefs = profile->GetPrefs(); GetCloudPrintServiceURL());
if (prefs->GetBoolean(prefs::kCloudPrintSubmitEnabled)) { base::StringValue gcp_url_value(gcp_url.spec());
GURL gcp_url(CloudPrintURL(profile).GetCloudPrintServiceURL()); web_ui_->CallJavascriptFunction("setUseCloudPrint", gcp_url_value);
base::StringValue gcp_url_value(gcp_url.spec());
web_ui_->CallJavascriptFunction("setUseCloudPrint", gcp_url_value);
}
} }
void PrintPreviewHandler::SendCloudPrintJob(const DictionaryValue& settings, void PrintPreviewHandler::SendCloudPrintJob(const DictionaryValue& settings,
......
...@@ -1553,9 +1553,6 @@ const char kCloudPrintRobotRefreshToken[] = "cloud_print.robot_refresh_token"; ...@@ -1553,9 +1553,6 @@ const char kCloudPrintRobotRefreshToken[] = "cloud_print.robot_refresh_token";
const char kCloudPrintRobotEmail[] = "cloud_print.robot_email"; const char kCloudPrintRobotEmail[] = "cloud_print.robot_email";
// Indicates whether the Mac Virtual driver is enabled. // Indicates whether the Mac Virtual driver is enabled.
const char kVirtualPrinterDriverEnabled[] = "cloud_print.enable_virtual_driver"; const char kVirtualPrinterDriverEnabled[] = "cloud_print.enable_virtual_driver";
// A boolean indicating whether submitting jobs to Google Cloud Print is
// blocked by policy.
const char kCloudPrintSubmitEnabled[] = "cloud_print.submit_enabled";
// Preference to store proxy settings. // Preference to store proxy settings.
const char kProxy[] = "proxy"; const char kProxy[] = "proxy";
......
...@@ -545,7 +545,6 @@ extern const char kCloudPrintEnableJobPoll[]; ...@@ -545,7 +545,6 @@ extern const char kCloudPrintEnableJobPoll[];
extern const char kCloudPrintRobotRefreshToken[]; extern const char kCloudPrintRobotRefreshToken[];
extern const char kCloudPrintRobotEmail[]; extern const char kCloudPrintRobotEmail[];
extern const char kVirtualPrinterDriverEnabled[]; extern const char kVirtualPrinterDriverEnabled[];
extern const char kCloudPrintSubmitEnabled[];
extern const char kProxy[]; extern const char kProxy[];
extern const char kMaxConnectionsPerProxy[]; extern const char kMaxConnectionsPerProxy[];
......
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