summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-06 00:03:08 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-06 00:03:08 +0000
commit847ed6c5908798298dca7c826ddcab817fec61ce (patch)
tree35c5dcd66f932c36c94caec22020582e89a7137e /chrome
parent86cbd2abef20a01360a77dfd8593735cd1f0dbd4 (diff)
downloadchromium_src-847ed6c5908798298dca7c826ddcab817fec61ce.zip
chromium_src-847ed6c5908798298dca7c826ddcab817fec61ce.tar.gz
chromium_src-847ed6c5908798298dca7c826ddcab817fec61ce.tar.bz2
Bunch of Coverity fixes, rather minor severity.
TEST=none BUG=none Review URL: http://codereview.chromium.org/159862 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22559 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/automation/automation_provider.cc2
-rw-r--r--chrome/browser/automation/automation_provider.h2
-rw-r--r--chrome/browser/bookmarks/bookmark_model.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_model.h2
-rw-r--r--chrome/browser/dom_ui/dom_ui_favicon_source.cc2
-rw-r--r--chrome/browser/dom_ui/dom_ui_favicon_source.h2
-rw-r--r--chrome/browser/fav_icon_helper.cc4
-rw-r--r--chrome/browser/fav_icon_helper.h4
-rw-r--r--chrome/browser/gtk/list_store_favicon_loader.cc7
-rw-r--r--chrome/browser/gtk/list_store_favicon_loader.h8
-rw-r--r--chrome/browser/history/history.h6
-rw-r--r--chrome/browser/history/history_unittest.cc2
-rw-r--r--chrome/browser/jumplist.cc2
-rw-r--r--chrome/browser/jumplist.h2
-rw-r--r--chrome/browser/possible_url_model.cc2
-rw-r--r--chrome/browser/possible_url_model.h2
-rw-r--r--chrome/browser/search_engines/template_url_table_model.cc2
-rw-r--r--chrome/browser/thumbnail_store.cc2
-rw-r--r--chrome/browser/thumbnail_store.h2
-rw-r--r--chrome/browser/views/options/general_page_view.cc4
-rw-r--r--chrome/common/child_thread.cc2
-rw-r--r--chrome/common/child_thread.h2
-rw-r--r--chrome/test/automation/automation_proxy_uitest.cc2
23 files changed, 36 insertions, 31 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index d3d8cce..6e0171e 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -1844,7 +1844,7 @@ void AutomationProvider::OnChannelError() {
// TODO(brettw) change this to accept GURLs when history supports it
void AutomationProvider::OnRedirectQueryComplete(
HistoryService::Handle request_handle,
- GURL from_url,
+ const GURL& from_url,
bool success,
history::RedirectList* redirects) {
DCHECK(request_handle == redirect_query_);
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h
index 0d9b08c..8b171b7 100644
--- a/chrome/browser/automation/automation_provider.h
+++ b/chrome/browser/automation/automation_provider.h
@@ -466,7 +466,7 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>,
// Callback for history redirect queries.
virtual void OnRedirectQueryComplete(
HistoryService::Handle request_handle,
- GURL from_url,
+ const GURL& from_url,
bool success,
history::RedirectList* redirects);
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc
index 9bcc8c3..e9573ac 100644
--- a/chrome/browser/bookmarks/bookmark_model.cc
+++ b/chrome/browser/bookmarks/bookmark_model.cc
@@ -636,7 +636,7 @@ void BookmarkModel::OnFavIconDataAvailable(
bool know_favicon,
scoped_refptr<RefCountedBytes> data,
bool expired,
- GURL icon_url) {
+ const GURL& icon_url) {
SkBitmap fav_icon;
BookmarkNode* node =
load_consumer_.GetClientData(
diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h
index 8da3bcd..1137159 100644
--- a/chrome/browser/bookmarks/bookmark_model.h
+++ b/chrome/browser/bookmarks/bookmark_model.h
@@ -371,7 +371,7 @@ class BookmarkModel : public NotificationObserver, public BookmarkService {
bool know_favicon,
scoped_refptr<RefCountedBytes> data,
bool expired,
- GURL icon_url);
+ const GURL& icon_url);
// Invoked from the node to load the favicon. Requests the favicon from the
// history service.
diff --git a/chrome/browser/dom_ui/dom_ui_favicon_source.cc b/chrome/browser/dom_ui/dom_ui_favicon_source.cc
index bb7b9f0..8f77134 100644
--- a/chrome/browser/dom_ui/dom_ui_favicon_source.cc
+++ b/chrome/browser/dom_ui/dom_ui_favicon_source.cc
@@ -42,7 +42,7 @@ void DOMUIFavIconSource::OnFavIconDataAvailable(
bool know_favicon,
scoped_refptr<RefCountedBytes> data,
bool expired,
- GURL icon_url) {
+ const GURL& icon_url) {
HistoryService* hs =
profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
int request_id = cancelable_consumer_.GetClientData(hs, request_handle);
diff --git a/chrome/browser/dom_ui/dom_ui_favicon_source.h b/chrome/browser/dom_ui/dom_ui_favicon_source.h
index 42d770c..b33f0e5 100644
--- a/chrome/browser/dom_ui/dom_ui_favicon_source.h
+++ b/chrome/browser/dom_ui/dom_ui_favicon_source.h
@@ -37,7 +37,7 @@ class DOMUIFavIconSource : public ChromeURLDataManager::DataSource {
bool know_favicon,
scoped_refptr<RefCountedBytes> data,
bool expired,
- GURL url);
+ const GURL& url);
private:
Profile* profile_;
diff --git a/chrome/browser/fav_icon_helper.cc b/chrome/browser/fav_icon_helper.cc
index 564c262..a984ed1 100644
--- a/chrome/browser/fav_icon_helper.cc
+++ b/chrome/browser/fav_icon_helper.cc
@@ -155,7 +155,7 @@ void FavIconHelper::OnFavIconDataForInitialURL(
bool know_favicon,
scoped_refptr<RefCountedBytes> data,
bool expired,
- GURL icon_url) {
+ const GURL& icon_url) {
NavigationEntry* entry = GetEntry();
if (!entry)
return;
@@ -226,7 +226,7 @@ void FavIconHelper::OnFavIconData(
bool know_favicon,
scoped_refptr<RefCountedBytes> data,
bool expired,
- GURL icon_url) {
+ const GURL& icon_url) {
NavigationEntry* entry = GetEntry();
if (!entry)
return;
diff --git a/chrome/browser/fav_icon_helper.h b/chrome/browser/fav_icon_helper.h
index adbcaf0..1cb1fa0 100644
--- a/chrome/browser/fav_icon_helper.h
+++ b/chrome/browser/fav_icon_helper.h
@@ -120,7 +120,7 @@ class FavIconHelper : public RenderViewHostDelegate::FavIcon {
bool know_favicon,
scoped_refptr<RefCountedBytes> data,
bool expired,
- GURL icon_url);
+ const GURL& icon_url);
// If the favicon has expired, asks the renderer to download the favicon.
// Otherwise asks history to update the mapping between page url and icon
@@ -132,7 +132,7 @@ class FavIconHelper : public RenderViewHostDelegate::FavIcon {
bool know_favicon,
scoped_refptr<RefCountedBytes> data,
bool expired,
- GURL icon_url);
+ const GURL& icon_url);
// Schedules a download for the specified entry. This adds the request to
// download_requests_.
diff --git a/chrome/browser/gtk/list_store_favicon_loader.cc b/chrome/browser/gtk/list_store_favicon_loader.cc
index 5a34dd0..eff00a5e 100644
--- a/chrome/browser/gtk/list_store_favicon_loader.cc
+++ b/chrome/browser/gtk/list_store_favicon_loader.cc
@@ -57,8 +57,11 @@ bool ListStoreFavIconLoader::GetRowByFavIconHandle(
}
void ListStoreFavIconLoader::OnGotFavIcon(
- HistoryService::Handle handle, bool know_fav_icon,
- scoped_refptr<RefCountedBytes> image_data, bool is_expired, GURL icon_url) {
+ HistoryService::Handle handle,
+ bool know_fav_icon,
+ scoped_refptr<RefCountedBytes> image_data,
+ bool is_expired,
+ const GURL& icon_url) {
GtkTreeIter iter;
if (!GetRowByFavIconHandle(handle, &iter))
return;
diff --git a/chrome/browser/gtk/list_store_favicon_loader.h b/chrome/browser/gtk/list_store_favicon_loader.h
index 935c0f7..69d6ae9 100644
--- a/chrome/browser/gtk/list_store_favicon_loader.h
+++ b/chrome/browser/gtk/list_store_favicon_loader.h
@@ -35,9 +35,11 @@ class ListStoreFavIconLoader {
GtkTreeIter* result_iter);
// Callback from HistoryService:::GetFavIconForURL
- void OnGotFavIcon(HistoryService::Handle handle, bool know_fav_icon,
- scoped_refptr<RefCountedBytes> image_data, bool is_expired,
- GURL icon_url);
+ void OnGotFavIcon(HistoryService::Handle handle,
+ bool know_fav_icon,
+ scoped_refptr<RefCountedBytes> image_data,
+ bool is_expired,
+ const GURL& icon_url);
// The list store we are loading favicons into.
GtkListStore* list_store_;
diff --git a/chrome/browser/history/history.h b/chrome/browser/history/history.h
index 0643139..caac179 100644
--- a/chrome/browser/history/history.h
+++ b/chrome/browser/history/history.h
@@ -270,8 +270,8 @@ class HistoryService : public CancelableRequestProvider,
// some reason, success will additionally be false. If the given page
// has redirected to multiple destinations, this will pick a random one.
typedef Callback4<Handle,
- GURL, // from_url
- bool, // success
+ const GURL&, // from_url
+ bool, // success
history::RedirectList*>::Type
QueryRedirectsCallback;
@@ -356,7 +356,7 @@ class HistoryService : public CancelableRequestProvider,
bool, // know_favicon
scoped_refptr<RefCountedBytes>, // data
bool, // expired
- GURL>::Type // url of the favicon
+ const GURL&>::Type // url of the favicon
FavIconDataCallback;
// Requests the favicon. FavIconConsumer is notified
diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc
index 23463440..8d153d8 100644
--- a/chrome/browser/history/history_unittest.cc
+++ b/chrome/browser/history/history_unittest.cc
@@ -240,7 +240,7 @@ class HistoryTest : public testing::Test {
// Callback for QueryRedirects.
void OnRedirectQueryComplete(HistoryService::Handle handle,
- GURL url,
+ const GURL& url,
bool success,
history::RedirectList* redirects) {
redirect_query_success_ = success;
diff --git a/chrome/browser/jumplist.cc b/chrome/browser/jumplist.cc
index fcf39e6..6ea210e 100644
--- a/chrome/browser/jumplist.cc
+++ b/chrome/browser/jumplist.cc
@@ -709,7 +709,7 @@ void JumpList::OnFavIconDataAvailable(
bool know_favicon,
scoped_refptr<RefCountedBytes> data,
bool expired,
- GURL icon_url) {
+ const GURL& icon_url) {
// Attach the received data to the ShellLinkItem object.
// This data will be decoded by JumpListUpdateTask.
if (know_favicon && data.get() && !data->data.empty())
diff --git a/chrome/browser/jumplist.h b/chrome/browser/jumplist.h
index e107482..824e1ac 100644
--- a/chrome/browser/jumplist.h
+++ b/chrome/browser/jumplist.h
@@ -159,7 +159,7 @@ class JumpList : public TabRestoreService::Observer {
bool know_favicon,
scoped_refptr<RefCountedBytes> data,
bool expired,
- GURL icon_url);
+ const GURL& icon_url);
private:
// Our consumers for HistoryService.
diff --git a/chrome/browser/possible_url_model.cc b/chrome/browser/possible_url_model.cc
index 795755f..1c7a1ea 100644
--- a/chrome/browser/possible_url_model.cc
+++ b/chrome/browser/possible_url_model.cc
@@ -166,7 +166,7 @@ void PossibleURLModel::OnFavIconAvailable(
bool fav_icon_available,
scoped_refptr<RefCountedBytes> data,
bool expired,
- GURL icon_url) {
+ const GURL& icon_url) {
if (profile_) {
HistoryService* hs =
profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
diff --git a/chrome/browser/possible_url_model.h b/chrome/browser/possible_url_model.h
index 4a688fe..582506d 100644
--- a/chrome/browser/possible_url_model.h
+++ b/chrome/browser/possible_url_model.h
@@ -51,7 +51,7 @@ class PossibleURLModel : public TableModel {
bool fav_icon_available,
scoped_refptr<RefCountedBytes> data,
bool expired,
- GURL icon_url);
+ const GURL& icon_url);
virtual void SetObserver(TableModelObserver* observer) {
observer_ = observer;
diff --git a/chrome/browser/search_engines/template_url_table_model.cc b/chrome/browser/search_engines/template_url_table_model.cc
index 97c6525..7b2dd65 100644
--- a/chrome/browser/search_engines/template_url_table_model.cc
+++ b/chrome/browser/search_engines/template_url_table_model.cc
@@ -97,7 +97,7 @@ class ModelEntry {
bool know_favicon,
scoped_refptr<RefCountedBytes> data,
bool expired,
- GURL icon_url) {
+ const GURL& icon_url) {
load_state_ = LOADED;
if (know_favicon && data.get() &&
PNGDecoder::Decode(&data->data, &fav_icon_)) {
diff --git a/chrome/browser/thumbnail_store.cc b/chrome/browser/thumbnail_store.cc
index 4f30c62..94e3e90 100644
--- a/chrome/browser/thumbnail_store.cc
+++ b/chrome/browser/thumbnail_store.cc
@@ -156,7 +156,7 @@ void ThumbnailStore::Shutdown() {
void ThumbnailStore::OnRedirectsForURLAvailable(
HistoryService::Handle handle,
- GURL url,
+ const GURL& url,
bool success,
history::RedirectList* redirects) {
if (!success)
diff --git a/chrome/browser/thumbnail_store.h b/chrome/browser/thumbnail_store.h
index 143cbce..aaa03ce 100644
--- a/chrome/browser/thumbnail_store.h
+++ b/chrome/browser/thumbnail_store.h
@@ -117,7 +117,7 @@ class ThumbnailStore : public base::RefCountedThreadSafe<ThumbnailStore>,
// will be called with url=C and redirects = {B -> A}. This information gets
// inserted into the RedirectMap as A => {B -> C}.
void OnRedirectsForURLAvailable(HistoryService::Handle handle,
- GURL url,
+ const GURL& url,
bool success,
history::RedirectList* redirects);
diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc
index e99444d..f8c1dce 100644
--- a/chrome/browser/views/options/general_page_view.cc
+++ b/chrome/browser/views/options/general_page_view.cc
@@ -106,7 +106,7 @@ class CustomHomePagesTableModel : public TableModel {
bool know_fav_icon,
scoped_refptr<RefCountedBytes> image_data,
bool is_expired,
- GURL icon_url);
+ const GURL& icon_url);
// Returns the entry whose fav_icon_handle matches handle and sets entry_index
// to the index of the entry.
@@ -230,7 +230,7 @@ void CustomHomePagesTableModel::OnGotFavIcon(
bool know_fav_icon,
scoped_refptr<RefCountedBytes> image_data,
bool is_expired,
- GURL icon_url) {
+ const GURL& icon_url) {
int entry_index;
Entry* entry = GetEntryByLoadHandle(handle, &entry_index);
DCHECK(entry);
diff --git a/chrome/common/child_thread.cc b/chrome/common/child_thread.cc
index 9168570..8e9e90c 100644
--- a/chrome/common/child_thread.cc
+++ b/chrome/common/child_thread.cc
@@ -22,7 +22,7 @@ ChildThread::ChildThread() {
Init();
}
-ChildThread::ChildThread(const std::string channel_name)
+ChildThread::ChildThread(const std::string& channel_name)
: channel_name_(channel_name) {
Init();
}
diff --git a/chrome/common/child_thread.h b/chrome/common/child_thread.h
index 91ea9b7..afcd803 100644
--- a/chrome/common/child_thread.h
+++ b/chrome/common/child_thread.h
@@ -20,7 +20,7 @@ class ChildThread : public IPC::Channel::Listener,
// Creates the thread.
ChildThread();
// Used for single-process mode.
- ChildThread(const std::string channel_name);
+ ChildThread(const std::string& channel_name);
virtual ~ChildThread();
// IPC::Message::Sender implementation:
diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc
index 75395af..c67c1f7 100644
--- a/chrome/test/automation/automation_proxy_uitest.cc
+++ b/chrome/test/automation/automation_proxy_uitest.cc
@@ -829,7 +829,7 @@ TEST_F(ExternalTabTestType, IncognitoMode) {
tab = NULL;
CloseBrowserAndServer();
- value_result.empty();
+ value_result.clear();
clear_profile_ = false;
external_tab_container = NULL;
tab_wnd = NULL;