summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-07 19:21:19 +0000
committerkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-07 19:21:19 +0000
commitdde0c6797b6222eec6ce57d9262d15987d226131 (patch)
treea44b9abd76f0b0ef3c76fff28dda2e271ccbec36
parent3dfcbc747bb55701d0cffdb9d635067c4a02f4c6 (diff)
downloadchromium_src-dde0c6797b6222eec6ce57d9262d15987d226131.zip
chromium_src-dde0c6797b6222eec6ce57d9262d15987d226131.tar.gz
chromium_src-dde0c6797b6222eec6ce57d9262d15987d226131.tar.bz2
Coverity: Fix pass by value error.
CID=103734 BUG=none TEST=none Review URL: http://codereview.chromium.org/10382032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135695 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/history/url_index_private_data.cc2
-rw-r--r--chrome/browser/history/url_index_private_data.h5
2 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/history/url_index_private_data.cc b/chrome/browser/history/url_index_private_data.cc
index 0e4cfa6..f7050f7 100644
--- a/chrome/browser/history/url_index_private_data.cc
+++ b/chrome/browser/history/url_index_private_data.cc
@@ -1095,7 +1095,7 @@ void URLIndexPrivateData::SaveWordStartsMap(
void URLIndexPrivateData::RestoreFromFileTask(
const FilePath& file_path,
scoped_refptr<URLIndexPrivateData> private_data,
- std::string languages) {
+ const std::string& languages) {
private_data = URLIndexPrivateData::RestoreFromFile(file_path, languages);
}
diff --git a/chrome/browser/history/url_index_private_data.h b/chrome/browser/history/url_index_private_data.h
index 58d5130..c09b725 100644
--- a/chrome/browser/history/url_index_private_data.h
+++ b/chrome/browser/history/url_index_private_data.h
@@ -141,12 +141,11 @@ class URLIndexPrivateData
// Creates a new URLIndexPrivateData object, populates it from the contents
// of the cache file stored in |file_path|, and assigns it to |private_data|.
- // |languages| will be used to break URLs and page titles into words and is
- // deliberately passed by value.
+ // |languages| will be used to break URLs and page titles into words.
static void RestoreFromFileTask(
const FilePath& file_path,
scoped_refptr<URLIndexPrivateData> private_data,
- std::string languages);
+ const std::string& languages);
// Constructs a new object by restoring its contents from the file at |path|.
// Returns the new URLIndexPrivateData which on success will contain the