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

Unified Diff: pdf/pdfium/pdfium_page.cc

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes Created 5 years, 3 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: pdf/pdfium/pdfium_page.cc
diff --git a/pdf/pdfium/pdfium_page.cc b/pdf/pdfium/pdfium_page.cc
index 93e764564f34d57a7f10e8ef9261c62438b2d91b..fe1a07e5f7ca80fa79aedd585f17f6a30a9d8084 100644
--- a/pdf/pdfium/pdfium_page.cc
+++ b/pdf/pdfium/pdfium_page.cc
@@ -240,14 +240,15 @@ base::Value* PDFiumPage::GetTextBoxAsValue(double page_height,
return node;
}
-base::Value* PDFiumPage::CreateTextNode(std::string text) {
+base::Value* PDFiumPage::CreateTextNode(const std::string& text) {
base::DictionaryValue* node = new base::DictionaryValue();
node->SetString(kTextNodeType, kTextNodeTypeText);
node->SetString(kTextNodeText, text);
return node;
}
-base::Value* PDFiumPage::CreateURLNode(std::string text, std::string url) {
+base::Value* PDFiumPage::CreateURLNode(const std::string& text,
+ const std::string& url) {
base::DictionaryValue* node = new base::DictionaryValue();
node->SetString(kTextNodeType, kTextNodeTypeURL);
node->SetString(kTextNodeText, text);

Powered by Google App Engine
This is Rietveld 408576698