diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-06 07:46:37 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-06 07:46:37 +0000 |
commit | 3e377c5a80be45d36a6015c80d9e2dae525cf042 (patch) | |
tree | 089f72c86a2f2314e527f2e95a3903253fbcf51a /chrome/browser | |
parent | a42d22a1abe11d4f138c4c0870568be69bad5301 (diff) | |
download | chromium_src-3e377c5a80be45d36a6015c80d9e2dae525cf042.zip chromium_src-3e377c5a80be45d36a6015c80d9e2dae525cf042.tar.gz chromium_src-3e377c5a80be45d36a6015c80d9e2dae525cf042.tar.bz2 |
Revert of r22559.
This caused an easily reproducible crash:
1. Start with a fresh profile
2. Navigate to google.com
3. Restart
4. Navigate to google.com
5. crash
The change from pass-by-value to pass-by-ref in
fav_icon_helper.* seems to be to blame, but I can't see it
right off.
TBR=phajdan.jr@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22595 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
20 files changed, 28 insertions, 33 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index da9fbd5..a8e9004 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, - const GURL& from_url, + 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 8b171b7..0d9b08c 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, - const GURL& from_url, + 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 e9573ac..9bcc8c3 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, - const GURL& icon_url) { + 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 1137159..8da3bcd 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, - const GURL& icon_url); + 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 8f77134..bb7b9f0 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, - const GURL& icon_url) { + 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 b33f0e5..42d770c 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, - const GURL& url); + GURL url); private: Profile* profile_; diff --git a/chrome/browser/fav_icon_helper.cc b/chrome/browser/fav_icon_helper.cc index a984ed1..564c262 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, - const GURL& icon_url) { + 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, - const GURL& icon_url) { + 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 1cb1fa0..adbcaf0 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, - const GURL& icon_url); + 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, - const GURL& icon_url); + 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 eff00a5e..5a34dd0 100644 --- a/chrome/browser/gtk/list_store_favicon_loader.cc +++ b/chrome/browser/gtk/list_store_favicon_loader.cc @@ -57,11 +57,8 @@ bool ListStoreFavIconLoader::GetRowByFavIconHandle( } void ListStoreFavIconLoader::OnGotFavIcon( - HistoryService::Handle handle, - bool know_fav_icon, - scoped_refptr<RefCountedBytes> image_data, - bool is_expired, - const GURL& icon_url) { + HistoryService::Handle handle, bool know_fav_icon, + scoped_refptr<RefCountedBytes> image_data, bool is_expired, 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 69d6ae9..935c0f7 100644 --- a/chrome/browser/gtk/list_store_favicon_loader.h +++ b/chrome/browser/gtk/list_store_favicon_loader.h @@ -35,11 +35,9 @@ 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, - const GURL& icon_url); + void OnGotFavIcon(HistoryService::Handle handle, bool know_fav_icon, + scoped_refptr<RefCountedBytes> image_data, bool is_expired, + 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 caac179..0643139 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, - const GURL&, // from_url - bool, // success + 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 - const GURL&>::Type // url of the favicon + 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 8d153d8..23463440 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, - const GURL& url, + GURL url, bool success, history::RedirectList* redirects) { redirect_query_success_ = success; diff --git a/chrome/browser/jumplist.cc b/chrome/browser/jumplist.cc index 6ea210e..fcf39e6 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, - const GURL& icon_url) { + 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 824e1ac..e107482 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, - const GURL& icon_url); + 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 1c7a1ea..795755f 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, - const GURL& icon_url) { + 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 582506d..4a688fe 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, - const GURL& icon_url); + 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 7b2dd65..97c6525 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, - const GURL& icon_url) { + 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 94e3e90..4f30c62 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, - const GURL& url, + GURL url, bool success, history::RedirectList* redirects) { if (!success) diff --git a/chrome/browser/thumbnail_store.h b/chrome/browser/thumbnail_store.h index aaa03ce..143cbce 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, - const GURL& url, + 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 f8c1dce..e99444d 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, - const GURL& icon_url); + 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, - const GURL& icon_url) { + GURL icon_url) { int entry_index; Entry* entry = GetEntryByLoadHandle(handle, &entry_index); DCHECK(entry); |