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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 1397333003: PDF Printing: embed browser user agent string in PDF metadata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2015-11-05 (Thursday) 15:50:39 EST Created 5 years, 1 month 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 | « no previous file | printing/pdf_metafile_skia.cc » ('j') | printing/pdf_metafile_skia.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 3d815b12700a504dff8e384297d232fe6a98bf1a..f75ccd02f857011e81c592eed1d4907e268b6375 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -15,6 +15,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/common/channel_info.h"
+#include "chrome/common/chrome_content_client.h"
Lei Zhang 2015/11/05 21:37:23 You can move both new #includes into the ENABLE_PR
hal.canary 2015/11/05 22:16:48 done
#include "chrome/common/chrome_isolated_world_ids.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
@@ -83,6 +84,7 @@
#include "net/base/net_errors.h"
#include "ppapi/c/private/ppb_pdf.h"
#include "ppapi/shared_impl/ppapi_switches.h"
+#include "printing/print_settings.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/platform/WebURLError.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
@@ -355,6 +357,9 @@ ChromeContentRendererClient::ChromeContentRendererClient() {
for (size_t i = 0; i < arraysize(kPredefinedAllowedCompositorOrigins); ++i)
allowed_compositor_origins_.insert(kPredefinedAllowedCompositorOrigins[i]);
#endif
+#if defined(ENABLE_PRINTING)
+ printing::SetAgent(GetUserAgent());
+#endif
}
ChromeContentRendererClient::~ChromeContentRendererClient() {
« no previous file with comments | « no previous file | printing/pdf_metafile_skia.cc » ('j') | printing/pdf_metafile_skia.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698