Commit 6574d79e authored by orenb@chromium.org's avatar orenb@chromium.org

Fixed coverity defects pertaining to pass-by-value use where pass-by-reference is preferred

CID_COUNT=3
CID=(104210, 104215),104237,104238
BUG=
TEST=
TBR=jln,bolms,brettw

Review URL: https://chromiumcodereview.appspot.com/10825016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148437 0039d316-1c4b-4281-b951-d872f2087c98
parent 7f806f9f
......@@ -37,7 +37,7 @@ void ShellWindowRegistry::RemoveObserver(Observer* observer) {
}
ShellWindowRegistry::ShellWindowSet ShellWindowRegistry::GetShellWindowsForApp(
const std::string app_id) const {
const std::string& app_id) const {
ShellWindowSet app_windows;
for (ShellWindowSet::const_iterator i = shell_windows_.begin();
i != shell_windows_.end(); ++i) {
......
......@@ -58,7 +58,7 @@ class ShellWindowRegistry : public ProfileKeyedService {
void RemoveObserver(Observer* observer);
// Returns a set of windows owned by the application identified by app_id.
ShellWindowSet GetShellWindowsForApp(const std::string app_id) const;
ShellWindowSet GetShellWindowsForApp(const std::string& app_id) const;
const ShellWindowSet& shell_windows() const { return shell_windows_; }
// Helper functions to find shell windows with particular attributes.
......
......@@ -249,7 +249,7 @@ bool Sandbox::isSingleThreaded(int proc_fd) {
return true;
}
static bool isDenied(Sandbox::ErrorCode code) {
static bool isDenied(const Sandbox::ErrorCode& code) {
return (code & SECCOMP_RET_ACTION) == SECCOMP_RET_TRAP ||
(code >= (SECCOMP_RET_ERRNO + 1) &&
code <= (SECCOMP_RET_ERRNO + 4095));
......
......@@ -325,7 +325,7 @@ class Sandbox {
friend class Util;
friend class Verifier;
struct Range {
Range(uint32_t f, uint32_t t, ErrorCode e) :
Range(uint32_t f, uint32_t t, const ErrorCode& e) :
from(f),
to(t),
err(e) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment