summaryrefslogtreecommitdiffstats
path: root/pdf
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-06-11 18:57:57 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-12 01:59:01 +0000
commit44ce0ec5b05184c4e33d597d4e5a32d9f38b15c2 (patch)
tree30eccdbbe72fb47810535fe56e0a8313be2db4b2 /pdf
parent57ca2cd795596162f06a6aa67367d8ce0d9ded52 (diff)
downloadchromium_src-44ce0ec5b05184c4e33d597d4e5a32d9f38b15c2.zip
chromium_src-44ce0ec5b05184c4e33d597d4e5a32d9f38b15c2.tar.gz
chromium_src-44ce0ec5b05184c4e33d597d4e5a32d9f38b15c2.tar.bz2
Move StartsWith[ASCII] to base namespace.
NOPRESUBMIT=true (no presubmit due to removing base:: from a ScopedAllowIO) Review URL: https://codereview.chromium.org/1172183002 Cr-Commit-Position: refs/heads/master@{#334108}
Diffstat (limited to 'pdf')
-rw-r--r--pdf/document_loader.cc10
-rw-r--r--pdf/pdfium/pdfium_engine.cc2
2 files changed, 6 insertions, 6 deletions
diff --git a/pdf/document_loader.cc b/pdf/document_loader.cc
index 8801a5a..48d8352 100644
--- a/pdf/document_loader.cc
+++ b/pdf/document_loader.cc
@@ -29,7 +29,7 @@ bool GetByteRange(const std::string& headers, uint32_t* start, uint32_t* end) {
while (it.GetNext()) {
if (base::LowerCaseEqualsASCII(it.name(), "content-range")) {
std::string range = it.values().c_str();
- if (StartsWithASCII(range, "bytes", false)) {
+ if (base::StartsWithASCII(range, "bytes", false)) {
range = range.substr(strlen("bytes"));
std::string::size_type pos = range.find('-');
std::string range_end;
@@ -53,7 +53,7 @@ std::string GetMultiPartBoundary(const std::string& headers) {
while (it.GetNext()) {
if (base::LowerCaseEqualsASCII(it.name(), "content-type")) {
std::string type = base::StringToLowerASCII(it.values());
- if (StartsWithASCII(type, "multipart/", true)) {
+ if (base::StartsWithASCII(type, "multipart/", true)) {
const char* boundary = strstr(type.c_str(), "boundary=");
if (!boundary) {
NOTREACHED();
@@ -118,8 +118,8 @@ bool DocumentLoader::Init(const pp::URLLoader& loader,
// This happens for PDFs not loaded from http(s) sources.
if (response_headers == "Content-Type: text/plain") {
- if (!StartsWithASCII(url, "http://", false) &&
- !StartsWithASCII(url, "https://", false)) {
+ if (!base::StartsWithASCII(url, "http://", false) &&
+ !base::StartsWithASCII(url, "https://", false)) {
type = "application/pdf";
}
}
@@ -147,7 +147,7 @@ bool DocumentLoader::Init(const pp::URLLoader& loader,
}
if (!type.empty() && !IsValidContentType(type))
return false;
- if (StartsWithASCII(disposition, "attachment", false))
+ if (base::StartsWithASCII(disposition, "attachment", false))
return false;
if (content_length > 0)
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 52605e9..1672ec4 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -3917,7 +3917,7 @@ bool PDFiumEngineExports::RenderPDFPageToDC(const void* pdf_buffer,
doc, "Creator", WriteInto(&creator, buffer_bytes + 1), buffer_bytes);
}
bool use_bitmap = false;
- if (StartsWith(creator, L"cairo", false))
+ if (base::StartsWith(creator, L"cairo", false))
use_bitmap = true;
// Another temporary hack. Some PDFs seems to render very slowly if