summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/printing/printing_message_filter.cc1
-rw-r--r--chrome/browser/resources/print_preview/print_preview_page.html4
-rw-r--r--chrome/common/print_messages.cc2
-rw-r--r--chrome/common/print_messages.h4
-rw-r--r--chrome/renderer/mock_printer.cc4
-rw-r--r--chrome/renderer/mock_printer.h1
-rw-r--r--chrome/renderer/printing/print_web_view_helper.cc4
-rw-r--r--printing/print_settings.cc1
-rw-r--r--printing/print_settings.h1
-rw-r--r--printing/print_settings_initializer.cc3
10 files changed, 5 insertions, 20 deletions
diff --git a/chrome/browser/printing/printing_message_filter.cc b/chrome/browser/printing/printing_message_filter.cc
index 5b48b89..abd6b10 100644
--- a/chrome/browser/printing/printing_message_filter.cc
+++ b/chrome/browser/printing/printing_message_filter.cc
@@ -82,7 +82,6 @@ void RenderParamsFromPrintSettings(const printing::PrintSettings& settings,
params->supports_alpha_blend = settings.supports_alpha_blend();
params->should_print_backgrounds = settings.should_print_backgrounds;
params->display_header_footer = settings.display_header_footer;
- params->date = settings.date;
params->title = settings.title;
params->url = settings.url;
}
diff --git a/chrome/browser/resources/print_preview/print_preview_page.html b/chrome/browser/resources/print_preview/print_preview_page.html
index 0eab31f..d7a9de8 100644
--- a/chrome/browser/resources/print_preview/print_preview_page.html
+++ b/chrome/browser/resources/print_preview/print_preview_page.html
@@ -73,8 +73,10 @@ function setup(options) {
options['bottomMargin']);
footer.style.height = pixels(options['bottomMargin']);
- document.querySelector('#date span').innerText = options['date'];
+ document.querySelector('#date span').innerText =
+ new Date(options['date']).toLocaleDateString();
document.querySelector('#title span').innerText = options['title'];
+
document.querySelector('#url span').innerText = options['url'];
document.querySelector('#page_number span').innerText = options['pageNumber'];
diff --git a/chrome/common/print_messages.cc b/chrome/common/print_messages.cc
index a7ff157..74fa280 100644
--- a/chrome/common/print_messages.cc
+++ b/chrome/common/print_messages.cc
@@ -27,7 +27,6 @@ PrintMsg_Print_Params::PrintMsg_Print_Params()
print_scaling_option(WebKit::WebPrintScalingOptionSourceSize),
print_to_pdf(false),
display_header_footer(false),
- date(),
title(),
url(),
should_print_backgrounds(false) {
@@ -54,7 +53,6 @@ void PrintMsg_Print_Params::Reset() {
print_scaling_option = WebKit::WebPrintScalingOptionSourceSize;
print_to_pdf = false;
display_header_footer = false;
- date = string16();
title = string16();
url = string16();
should_print_backgrounds = false;
diff --git a/chrome/common/print_messages.h b/chrome/common/print_messages.h
index bfc0026..fe519fd 100644
--- a/chrome/common/print_messages.h
+++ b/chrome/common/print_messages.h
@@ -45,7 +45,6 @@ struct PrintMsg_Print_Params {
WebKit::WebPrintScalingOption print_scaling_option;
bool print_to_pdf;
bool display_header_footer;
- string16 date;
string16 title;
string16 url;
bool should_print_backgrounds;
@@ -137,9 +136,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintMsg_Print_Params)
// Specifies if the header and footer should be rendered.
IPC_STRUCT_TRAITS_MEMBER(display_header_footer)
- // Date string to be printed as header if requested by the user.
- IPC_STRUCT_TRAITS_MEMBER(date)
-
// Title string to be printed as header if requested by the user.
IPC_STRUCT_TRAITS_MEMBER(title)
diff --git a/chrome/renderer/mock_printer.cc b/chrome/renderer/mock_printer.cc
index fdcbd0e..d7a5c3f 100644
--- a/chrome/renderer/mock_printer.cc
+++ b/chrome/renderer/mock_printer.cc
@@ -72,7 +72,6 @@ MockPrinter::MockPrinter()
preview_request_id_(0),
print_scaling_option_(WebKit::WebPrintScalingOptionSourceSize),
display_header_footer_(false),
- date_(ASCIIToUTF16("date")),
title_(ASCIIToUTF16("title")),
url_(ASCIIToUTF16("url")),
use_invalid_settings_(false) {
@@ -119,7 +118,6 @@ void MockPrinter::SetDefaultPrintSettings(const PrintMsg_Print_Params& params) {
margin_left_ = params.margin_left;
margin_top_ = params.margin_top;
display_header_footer_ = params.display_header_footer;
- date_ = params.date;
title_ = params.title;
url_ = params.url;
}
@@ -162,7 +160,6 @@ void MockPrinter::ScriptedPrint(int cookie,
settings->params.print_to_pdf = print_to_pdf_;
settings->params.preview_request_id = preview_request_id_;
settings->params.display_header_footer = display_header_footer_;
- settings->params.date = date_;
settings->params.title = title_;
settings->params.url = url_;
printer_status_ = PRINTER_PRINTING;
@@ -312,7 +309,6 @@ void MockPrinter::SetPrintParams(PrintMsg_Print_Params* params) {
params->print_to_pdf = print_to_pdf_;
params->preview_request_id = preview_request_id_;
params->display_header_footer = display_header_footer_;
- params->date = date_;
params->title = title_;
params->url = url_;
}
diff --git a/chrome/renderer/mock_printer.h b/chrome/renderer/mock_printer.h
index 838717f..9386edfb 100644
--- a/chrome/renderer/mock_printer.h
+++ b/chrome/renderer/mock_printer.h
@@ -152,7 +152,6 @@ class MockPrinter {
// Used for displaying headers and footers.
bool display_header_footer_;
- string16 date_;
string16 title_;
string16 url_;
diff --git a/chrome/renderer/printing/print_web_view_helper.cc b/chrome/renderer/printing/print_web_view_helper.cc
index 668c5b1..f36d40c 100644
--- a/chrome/renderer/printing/print_web_view_helper.cc
+++ b/chrome/renderer/printing/print_web_view_helper.cc
@@ -1483,8 +1483,8 @@ bool PrintWebViewHelper::UpdatePrintSettings(
// Header/Footer: Set |header_footer_info_|.
if (settings.params.display_header_footer) {
header_footer_info_.reset(new base::DictionaryValue());
- header_footer_info_->SetString(kSettingHeaderFooterDate,
- settings.params.date);
+ header_footer_info_->SetDouble(kSettingHeaderFooterDate,
+ base::Time::Now().ToJsTime());
header_footer_info_->SetString(kSettingHeaderFooterURL,
settings.params.url);
header_footer_info_->SetString(kSettingHeaderFooterTitle,
diff --git a/printing/print_settings.cc b/printing/print_settings.cc
index f024d2a..05a7869 100644
--- a/printing/print_settings.cc
+++ b/printing/print_settings.cc
@@ -132,7 +132,6 @@ void PrintSettings::Clear() {
max_shrink = 2.;
desired_dpi = 72;
selection_only = false;
- date = base::string16();
title = base::string16();
url = base::string16();
display_header_footer = false;
diff --git a/printing/print_settings.h b/printing/print_settings.h
index f177699..cba378e 100644
--- a/printing/print_settings.h
+++ b/printing/print_settings.h
@@ -109,7 +109,6 @@ class PRINTING_EXPORT PrintSettings {
void SetOrientation(bool landscape);
// Strings to be printed as headers and footers if requested by the user.
- base::string16 date;
base::string16 title;
base::string16 url;
diff --git a/printing/print_settings_initializer.cc b/printing/print_settings_initializer.cc
index 9932536..67afc10 100644
--- a/printing/print_settings_initializer.cc
+++ b/printing/print_settings_initializer.cc
@@ -8,7 +8,6 @@
#include <cmath>
#include <string>
-#include "base/i18n/time_formatting.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
@@ -33,7 +32,6 @@ void PrintSettingsInitializer::InitHeaderFooterStrings(
if (!print_settings->display_header_footer)
return;
- base::string16 date = base::TimeFormatShortDateNumeric(base::Time::Now());
base::string16 title;
base::string16 url;
if (!job_settings.GetString(kSettingHeaderFooterTitle, &title) ||
@@ -41,7 +39,6 @@ void PrintSettingsInitializer::InitHeaderFooterStrings(
NOTREACHED();
}
- print_settings->date = date;
print_settings->title = title;
const gfx::FontList& default_fonts =
ui::ResourceBundle::GetSharedInstance().GetFontList(