Skip to content

Commit

Permalink
Coverity PASS_BY_VALUE fixes
Browse files Browse the repository at this point in the history
CID=2660,2611,2584,2582
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6736001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79330 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
dpapad@chromium.org committed Mar 24, 2011
1 parent 1d56a9a commit f25b54a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions chrome/browser/autocomplete/autocomplete.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

Expand Down Expand Up @@ -701,7 +701,7 @@ class AutocompleteController : public ACProviderListener {
// The data to log (via the metrics service) when the user selects an item
// from the omnibox popup.
struct AutocompleteLog {
AutocompleteLog(string16 text,
AutocompleteLog(const string16& text,
AutocompleteInput::Type input_type,
size_t selected_index,
size_t inline_autocompleted_length,
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/extensions/extension_bookmarks_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void ExtensionBookmarkEventRouter::Observe(BookmarkModel* model) {

void ExtensionBookmarkEventRouter::DispatchEvent(Profile *profile,
const char* event_name,
const std::string json_args) {
const std::string& json_args) {
if (profile->GetExtensionEventRouter()) {
profile->GetExtensionEventRouter()->DispatchEventToRenderers(
event_name, json_args, NULL, GURL());
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/extensions/extension_bookmarks_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class ExtensionBookmarkEventRouter : public BookmarkModelObserver {
// Helper to actually dispatch an event to extension listeners.
void DispatchEvent(Profile* profile,
const char* event_name,
const std::string json_args);
const std::string& json_args);

// These are stored so that Observe can be called multiple times safely.
// This way the caller doesn't have to know whether it's already observing
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/importer/mork_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class MorkReader {

// A MorkColumn describes a column of the table.
struct MorkColumn {
MorkColumn(IDString i, const std::string& n) : id(i), name(n) { }
MorkColumn(const IDString& i, const std::string& n) : id(i), name(n) { }

IDString id;
std::string name;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/metrics/metrics_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@ void MetricsService::GetSettingsFromUploadNode(xmlNodePtr upload_node) {
void MetricsService::GetSettingsFromUploadNodeRecursive(
xmlNodePtr node,
InheritedProperties props,
std::string path_prefix,
const std::string& path_prefix,
bool uploadOn) {
props.OverwriteWhereNeeded(node);

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/metrics/metrics_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class MetricsService : public NotificationObserver,
void GetSettingsFromUploadNode(xmlNodePtr upload_node);
void GetSettingsFromUploadNodeRecursive(xmlNodePtr node,
InheritedProperties props,
std::string path_prefix,
const std::string& path_prefix,
bool uploadOn);

// NodeProbabilityTest gets called at every node in the tree traversal
Expand Down

0 comments on commit f25b54a

Please sign in to comment.