summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-27 01:24:06 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-27 01:24:06 +0000
commit7feb8500ebed1895f08d9716afc092a10a2f7b07 (patch)
treeee94765b323327e3fd8dfc661335ea0ee065e009 /content
parent79c266203684643750a573e431cdb0fc0af5d850 (diff)
downloadchromium_src-7feb8500ebed1895f08d9716afc092a10a2f7b07.zip
chromium_src-7feb8500ebed1895f08d9716afc092a10a2f7b07.tar.gz
chromium_src-7feb8500ebed1895f08d9716afc092a10a2f7b07.tar.bz2
Coverity: Fix several pass-by-values.
CID_COUNT=8 CID=7757,8647,11476,16931,16932,100206,100577,102872 BUG=none TEST=none R=tbreisacher@chromium.org TBR=brettw@chromium.org,kalman@chromium.org Review URL: https://chromiumcodereview.appspot.com/10824033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/webui/web_ui_message_handler.cc6
-rw-r--r--content/public/browser/web_ui_message_handler.h2
-rw-r--r--content/renderer/renderer_main_platform_delegate_win.cc2
3 files changed, 5 insertions, 5 deletions
diff --git a/content/browser/webui/web_ui_message_handler.cc b/content/browser/webui/web_ui_message_handler.cc
index bf2d391..7e7e3ea 100644
--- a/content/browser/webui/web_ui_message_handler.cc
+++ b/content/browser/webui/web_ui_message_handler.cc
@@ -14,21 +14,21 @@
namespace content {
void WebUIMessageHandler::SetURLAndTitle(DictionaryValue* dictionary,
- string16 title,
+ const string16& title,
const GURL& gurl) {
dictionary->SetString("url", gurl.spec());
bool using_url_as_the_title = false;
+ string16 title_to_set(title);
if (title.empty()) {
using_url_as_the_title = true;
- title = UTF8ToUTF16(gurl.spec());
+ title_to_set = UTF8ToUTF16(gurl.spec());
}
// Since the title can contain BiDi text, we need to mark the text as either
// RTL or LTR, depending on the characters in the string. If we use the URL
// as the title, we mark the title as LTR since URLs are always treated as
// left to right strings.
- string16 title_to_set(title);
if (base::i18n::IsRTL()) {
if (using_url_as_the_title) {
base::i18n::WrapStringWithLTRFormatting(&title_to_set);
diff --git a/content/public/browser/web_ui_message_handler.h b/content/public/browser/web_ui_message_handler.h
index ab0c8dd..672a8ad 100644
--- a/content/public/browser/web_ui_message_handler.h
+++ b/content/public/browser/web_ui_message_handler.h
@@ -42,7 +42,7 @@ class CONTENT_EXPORT WebUIMessageHandler {
// Adds "url" and "title" keys on incoming dictionary, setting title
// as the url as a fallback on empty title.
static void SetURLAndTitle(base::DictionaryValue* dictionary,
- string16 title,
+ const string16& title,
const GURL& gurl);
// Extract an integer value from a list Value.
diff --git a/content/renderer/renderer_main_platform_delegate_win.cc b/content/renderer/renderer_main_platform_delegate_win.cc
index 200133d..a4f3095 100644
--- a/content/renderer/renderer_main_platform_delegate_win.cc
+++ b/content/renderer/renderer_main_platform_delegate_win.cc
@@ -65,7 +65,7 @@ void EnableThemeSupportForRenderer(bool no_sandbox) {
}
// Windows-only skia sandbox support
-void SkiaPreCacheFont(LOGFONT logfont) {
+void SkiaPreCacheFont(const LOGFONT& logfont) {
content::RenderThread* render_thread = content::RenderThread::Get();
if (render_thread) {
render_thread->PreCacheFont(logfont);