summaryrefslogtreecommitdiffstats
path: root/pdf
diff options
context:
space:
mode:
authorBrett Wilson <brettw@chromium.org>2015-07-07 16:38:09 -0700
committerBrett Wilson <brettw@chromium.org>2015-07-07 23:39:16 +0000
commite3c4d1a1228e00b190ad743a83f88a2266f45238 (patch)
tree3923b42b43c9b7a8a689d0468688b30bf9ea8f83 /pdf
parent1c33a26e56880fbf058fd796aa004e097e07b691 (diff)
downloadchromium_src-e3c4d1a1228e00b190ad743a83f88a2266f45238.zip
chromium_src-e3c4d1a1228e00b190ad743a83f88a2266f45238.tar.gz
chromium_src-e3c4d1a1228e00b190ad743a83f88a2266f45238.tar.bz2
Move WriteInto to base namespace.
Update all callers. De-inlines the template. For some reason touching the namespaces started givin errors about DCHECK not being defined. Indeed, this header does not include logging.h. Rather than include logging in this very common header, it seems preferable to move the implementation to the .cc file. This removes support for the wstring variant and updates the callers that used it. R=ben@chromium.org, ben TBR=jschuh (sandbox_win.cc) NOPRESUBMIT=true (this patch touches code using legacy wstrings) Review URL: https://codereview.chromium.org/1223983002. Cr-Commit-Position: refs/heads/master@{#337703}
Diffstat (limited to 'pdf')
-rw-r--r--pdf/pdfium/pdfium_api_string_buffer_adapter.cc2
-rw-r--r--pdf/pdfium/pdfium_engine.cc4
-rw-r--r--pdf/pdfium/pdfium_page.cc2
3 files changed, 4 insertions, 4 deletions
diff --git a/pdf/pdfium/pdfium_api_string_buffer_adapter.cc b/pdf/pdfium/pdfium_api_string_buffer_adapter.cc
index 92b46d2..c5be302 100644
--- a/pdf/pdfium/pdfium_api_string_buffer_adapter.cc
+++ b/pdf/pdfium/pdfium_api_string_buffer_adapter.cc
@@ -19,7 +19,7 @@ PDFiumAPIStringBufferAdapter<StringType>::PDFiumAPIStringBufferAdapter(
size_t expected_size,
bool check_expected_size)
: str_(str),
- data_(WriteInto(str, expected_size + 1)),
+ data_(base::WriteInto(str, expected_size + 1)),
expected_size_(expected_size),
check_expected_size_(check_expected_size),
is_closed_(false) {
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 026eeb4..0cc8b26 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -3913,8 +3913,8 @@ bool PDFiumEngineExports::RenderPDFPageToDC(const void* pdf_buffer,
base::string16 creator;
size_t buffer_bytes = FPDF_GetMetaText(doc, "Creator", NULL, 0);
if (buffer_bytes > 1) {
- FPDF_GetMetaText(
- doc, "Creator", WriteInto(&creator, buffer_bytes + 1), buffer_bytes);
+ FPDF_GetMetaText(doc, "Creator",
+ base::WriteInto(&creator, buffer_bytes + 1), buffer_bytes);
}
bool use_bitmap = false;
if (base::StartsWith(creator, L"cairo", base::CompareCase::INSENSITIVE_ASCII))
diff --git a/pdf/pdfium/pdfium_page.cc b/pdf/pdfium/pdfium_page.cc
index e514af3..a7912a6 100644
--- a/pdf/pdfium/pdfium_page.cc
+++ b/pdf/pdfium/pdfium_page.cc
@@ -157,7 +157,7 @@ base::Value* PDFiumPage::GetTextBoxAsValue(double page_height,
FPDFText_GetBoundedText(GetTextPage(), left, top, right, bottom, NULL, 0);
if (char_count > 0) {
unsigned short* data = reinterpret_cast<unsigned short*>(
- WriteInto(&text_utf16, char_count + 1));
+ base::WriteInto(&text_utf16, char_count + 1));
FPDFText_GetBoundedText(GetTextPage(),
left, top, right, bottom,
data, char_count);