From 27d7eddf9054383070cbf7d051b46d51d38ff46b Mon Sep 17 00:00:00 2001 From: "tbreisacher@chromium.org" Date: Wed, 25 Jan 2012 21:30:56 +0000 Subject: [Coverity] pass FilePath by const ref CID=16396 BUG=none TEST=none Review URL: http://codereview.chromium.org/9117050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119120 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/bookmarks/bookmark_extension_api.cc | 4 ++-- chrome/browser/bookmarks/bookmark_extension_api.h | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'chrome/browser/bookmarks') diff --git a/chrome/browser/bookmarks/bookmark_extension_api.cc b/chrome/browser/bookmarks/bookmark_extension_api.cc index ca3eb87..c40ec70 100644 --- a/chrome/browser/bookmarks/bookmark_extension_api.cc +++ b/chrome/browser/bookmarks/bookmark_extension_api.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -869,7 +869,7 @@ void BookmarksIOFunction::SelectFile(SelectFileDialog::Type type) { } void BookmarksIOFunction::ShowSelectFileDialog(SelectFileDialog::Type type, - FilePath default_path) { + const FilePath& default_path) { // Balanced in one of the three callbacks of SelectFileDialog: // either FileSelectionCanceled, MultiFilesSelected, or FileSelected AddRef(); diff --git a/chrome/browser/bookmarks/bookmark_extension_api.h b/chrome/browser/bookmarks/bookmark_extension_api.h index d1bc3ae..cce002f 100644 --- a/chrome/browser/bookmarks/bookmark_extension_api.h +++ b/chrome/browser/bookmarks/bookmark_extension_api.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -7,8 +7,8 @@ #pragma once #include -#include #include +#include #include "base/compiler_specific.h" #include "base/memory/ref_counted.h" @@ -213,7 +213,9 @@ class BookmarksIOFunction : public BookmarksFunction, void SelectFile(SelectFileDialog::Type type); private: - void ShowSelectFileDialog(SelectFileDialog::Type type, FilePath default_path); + void ShowSelectFileDialog( + SelectFileDialog::Type type, + const FilePath& default_path); protected: scoped_refptr select_file_dialog_; -- cgit v1.1