diff options
Diffstat (limited to 'chrome/browser/ui/webui')
-rw-r--r-- | chrome/browser/ui/webui/chrome_web_ui_factory.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/webui/extension_icon_source.cc | 6 | ||||
-rw-r--r-- | chrome/browser/ui/webui/favicon_source.cc | 9 | ||||
-rw-r--r-- | chrome/browser/ui/webui/history2_ui.cc | 9 | ||||
-rw-r--r-- | chrome/browser/ui/webui/history_ui.cc | 9 | ||||
-rw-r--r-- | chrome/browser/ui/webui/ntp/app_launcher_handler.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/webui/ntp/favicon_webui_handler.cc | 5 |
7 files changed, 17 insertions, 27 deletions
diff --git a/chrome/browser/ui/webui/chrome_web_ui_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_factory.cc index bcf2008..09f06cb 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_factory.cc @@ -340,7 +340,9 @@ void ChromeWebUIFactory::GetFaviconForURL( favicon.known_icon = favicon.image_data.get() != NULL && favicon.image_data->size() > 0; favicon.icon_type = history::FAVICON; - request->ForwardResultAsync(request->handle(), favicon); + request->ForwardResultAsync( + FaviconService::FaviconDataCallback::TupleType(request->handle(), + favicon)); } } diff --git a/chrome/browser/ui/webui/extension_icon_source.cc b/chrome/browser/ui/webui/extension_icon_source.cc index 81b0c833..f896457 100644 --- a/chrome/browser/ui/webui/extension_icon_source.cc +++ b/chrome/browser/ui/webui/extension_icon_source.cc @@ -4,8 +4,7 @@ #include "chrome/browser/ui/webui/extension_icon_source.h" -#include "base/bind.h" -#include "base/bind_helpers.h" +#include "base/callback.h" #include "base/memory/ref_counted_memory.h" #include "base/stl_util.h" #include "base/string_number_conversions.h" @@ -242,8 +241,7 @@ void ExtensionIconSource::LoadFaviconImage(int request_id) { favicon_url, history::FAVICON, &cancelable_consumer_, - base::Bind(&ExtensionIconSource::OnFaviconDataAvailable, - base::Unretained(this))); + NewCallback(this, &ExtensionIconSource::OnFaviconDataAvailable)); cancelable_consumer_.SetClientData(favicon_service, handle, request_id); } diff --git a/chrome/browser/ui/webui/favicon_source.cc b/chrome/browser/ui/webui/favicon_source.cc index 480c2f5..7b66fb7 100644 --- a/chrome/browser/ui/webui/favicon_source.cc +++ b/chrome/browser/ui/webui/favicon_source.cc @@ -4,8 +4,7 @@ #include "chrome/browser/ui/webui/favicon_source.h" -#include "base/bind.h" -#include "base/bind_helpers.h" +#include "base/callback.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/url_constants.h" #include "grit/ui_resources.h" @@ -42,8 +41,7 @@ void FaviconSource::StartDataRequest(const std::string& path, GURL(path.substr(8)), history::FAVICON, &cancelable_consumer_, - base::Bind(&FaviconSource::OnFaviconDataAvailable, - base::Unretained(this))); + NewCallback(this, &FaviconSource::OnFaviconDataAvailable)); } else { GURL url; @@ -65,8 +63,7 @@ void FaviconSource::StartDataRequest(const std::string& path, url, icon_types_, &cancelable_consumer_, - base::Bind(&FaviconSource::OnFaviconDataAvailable, - base::Unretained(this))); + NewCallback(this, &FaviconSource::OnFaviconDataAvailable)); } // Attach the ChromeURLDataManager request ID to the history request. cancelable_consumer_.SetClientData(favicon_service, handle, request_id); diff --git a/chrome/browser/ui/webui/history2_ui.cc b/chrome/browser/ui/webui/history2_ui.cc index 48cb4fa..7b80a82 100644 --- a/chrome/browser/ui/webui/history2_ui.cc +++ b/chrome/browser/ui/webui/history2_ui.cc @@ -150,8 +150,7 @@ void BrowsingHistoryHandler2::HandleGetHistory(const ListValue* args) { hs->QueryHistory(search_text_, options, &cancelable_search_consumer_, - base::Bind(&BrowsingHistoryHandler2::QueryComplete, - base::Unretained(this))); + NewCallback(this, &BrowsingHistoryHandler2::QueryComplete)); } void BrowsingHistoryHandler2::HandleSearchHistory(const ListValue* args) { @@ -176,8 +175,7 @@ void BrowsingHistoryHandler2::HandleSearchHistory(const ListValue* args) { hs->QueryHistory(search_text_, options, &cancelable_search_consumer_, - base::Bind(&BrowsingHistoryHandler2::QueryComplete, - base::Unretained(this))); + NewCallback(this, &BrowsingHistoryHandler2::QueryComplete)); } void BrowsingHistoryHandler2::HandleRemoveURLsOnOneDay(const ListValue* args) { @@ -218,8 +216,7 @@ void BrowsingHistoryHandler2::HandleRemoveURLsOnOneDay(const ListValue* args) { Profile::FromWebUI(web_ui_)->GetHistoryService(Profile::EXPLICIT_ACCESS); hs->ExpireHistoryBetween( urls_to_be_deleted_, begin_time, end_time, &cancelable_delete_consumer_, - base::Bind(&BrowsingHistoryHandler2::RemoveComplete, - base::Unretained(this))); + NewCallback(this, &BrowsingHistoryHandler2::RemoveComplete)); } void BrowsingHistoryHandler2::HandleClearBrowsingData(const ListValue* args) { diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc index ba1a648..f88d4db 100644 --- a/chrome/browser/ui/webui/history_ui.cc +++ b/chrome/browser/ui/webui/history_ui.cc @@ -181,8 +181,7 @@ void BrowsingHistoryHandler::HandleGetHistory(const ListValue* args) { hs->QueryHistory(search_text_, options, &cancelable_search_consumer_, - base::Bind(&BrowsingHistoryHandler::QueryComplete, - base::Unretained(this))); + NewCallback(this, &BrowsingHistoryHandler::QueryComplete)); } void BrowsingHistoryHandler::HandleSearchHistory(const ListValue* args) { @@ -207,8 +206,7 @@ void BrowsingHistoryHandler::HandleSearchHistory(const ListValue* args) { hs->QueryHistory(search_text_, options, &cancelable_search_consumer_, - base::Bind(&BrowsingHistoryHandler::QueryComplete, - base::Unretained(this))); + NewCallback(this, &BrowsingHistoryHandler::QueryComplete)); } void BrowsingHistoryHandler::HandleRemoveURLsOnOneDay(const ListValue* args) { @@ -244,8 +242,7 @@ void BrowsingHistoryHandler::HandleRemoveURLsOnOneDay(const ListValue* args) { Profile::FromWebUI(web_ui_)->GetHistoryService(Profile::EXPLICIT_ACCESS); hs->ExpireHistoryBetween( urls, begin_time, end_time, &cancelable_delete_consumer_, - base::Bind(&BrowsingHistoryHandler::RemoveComplete, - base::Unretained(this))); + NewCallback(this, &BrowsingHistoryHandler::RemoveComplete)); } void BrowsingHistoryHandler::HandleClearBrowsingData(const ListValue* args) { diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc index 3651009..111f9a7 100644 --- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc +++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc @@ -792,7 +792,7 @@ void AppLauncherHandler::HandleGenerateAppForLink(const ListValue* args) { FaviconService::Handle h = favicon_service->GetFaviconForURL( launch_url, history::FAVICON, &favicon_consumer_, - base::Bind(&AppLauncherHandler::OnFaviconForApp, base::Unretained(this))); + NewCallback(this, &AppLauncherHandler::OnFaviconForApp)); favicon_consumer_.SetClientData(favicon_service, h, install_info.release()); } diff --git a/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc b/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc index 0ae6443..f4e9688 100644 --- a/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc +++ b/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc @@ -5,7 +5,7 @@ #include "chrome/browser/ui/webui/ntp/favicon_webui_handler.h" #include "base/bind.h" -#include "base/bind_helpers.h" +#include "base/callback_old.h" #include "base/string_split.h" #include "base/string_util.h" #include "base/stringprintf.h" @@ -77,8 +77,7 @@ void FaviconWebUIHandler::HandleGetFaviconDominantColor(const ListValue* args) { GURL(path), history::FAVICON, &consumer_, - base::Bind(&FaviconWebUIHandler::OnFaviconDataAvailable, - base::Unretained(this))); + NewCallback(this, &FaviconWebUIHandler::OnFaviconDataAvailable)); consumer_.SetClientData(favicon_service, handle, id_++); } |