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

Unified Diff: chrome/browser/ui/webui/print_preview_handler.cc

Issue 8416047: Revert 107748 - Add policy for blocking GCP printing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview_handler.cc
===================================================================
--- chrome/browser/ui/webui/print_preview_handler.cc (revision 107759)
+++ chrome/browser/ui/webui/print_preview_handler.cc (working copy)
@@ -24,7 +24,6 @@
#include "base/values.h"
#include "chrome/browser/browser_process.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/cloud_print/cloud_print_url.h"
#include "chrome/browser/printing/print_dialog_cloud.h"
@@ -33,7 +32,6 @@
#include "chrome/browser/printing/print_system_task_proxy.h"
#include "chrome/browser/printing/print_view_manager.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/tabs/tab_strip_model.h"
#include "chrome/browser/ui/browser_list.h"
@@ -41,7 +39,6 @@
#include "chrome/browser/ui/webui/cloud_print_signin_dialog.h"
#include "chrome/browser/ui/webui/print_preview_ui.h"
#include "chrome/common/chrome_paths.h"
-#include "chrome/common/pref_names.h"
#include "chrome/common/print_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
@@ -661,13 +658,10 @@
}
void PrintPreviewHandler::SendCloudPrintEnabled() {
- Profile* profile = BrowserList::GetLastActive()->profile();
- PrefService* prefs = profile->GetPrefs();
- if (prefs->GetBoolean(prefs::kCloudPrintSubmitEnabled)) {
- GURL gcp_url(CloudPrintURL(profile).GetCloudPrintServiceURL());
- base::StringValue gcp_url_value(gcp_url.spec());
- web_ui_->CallJavascriptFunction("setUseCloudPrint", gcp_url_value);
- }
+ GURL gcp_url(CloudPrintURL(BrowserList::GetLastActive()->profile()).
+ GetCloudPrintServiceURL());
+ base::StringValue gcp_url_value(gcp_url.spec());
+ web_ui_->CallJavascriptFunction("setUseCloudPrint", gcp_url_value);
}
void PrintPreviewHandler::SendCloudPrintJob(const DictionaryValue& settings,
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698