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

Unified Diff: chrome/service/cloud_print/printer_job_handler.cc

Issue 1212883003: Include user email into document title before spooling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tue Jul 7 10:19:02 PDT 2015 Created 5 years, 5 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
Index: chrome/service/cloud_print/printer_job_handler.cc
diff --git a/chrome/service/cloud_print/printer_job_handler.cc b/chrome/service/cloud_print/printer_job_handler.cc
index 35a7ccd8f676b6bdcbd2e19925a64ab175db22fc..7bb46a4ef040b286d39f82897bbd952d7081ee7c 100644
--- a/chrome/service/cloud_print/printer_job_handler.cc
+++ b/chrome/service/cloud_print/printer_job_handler.cc
@@ -792,12 +792,15 @@ void PrinterJobHandler::DoPrint(const JobDetails& job_details,
DCHECK(job_spooler_.get());
if (!job_spooler_.get())
return;
- base::string16 document_name = printing::SimplifyDocumentTitle(
- base::UTF8ToUTF16(job_details.job_title_));
- if (document_name.empty()) {
- document_name = printing::SimplifyDocumentTitle(
- l10n_util::GetStringUTF16(IDS_DEFAULT_PRINT_DOCUMENT_TITLE));
- }
+
+ base::string16 document_name =
+ job_details.job_title_.empty()
+ ? l10n_util::GetStringUTF16(IDS_DEFAULT_PRINT_DOCUMENT_TITLE)
+ : base::UTF8ToUTF16(job_details.job_title_);
+
+ document_name = printing::FormatDocumentTitleWithOwner(
+ base::UTF8ToUTF16(job_details.job_owner_), document_name);
+
UMA_HISTOGRAM_ENUMERATION("CloudPrint.JobHandlerEvent",
JOB_HANDLER_START_SPOOLING, JOB_HANDLER_MAX);
spooling_start_time_ = base::Time::Now();
« no previous file with comments | « chrome/common/cloud_print/cloud_print_constants.cc ('k') | chrome/service/cloud_print/printer_job_queue_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698