Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: chrome/browser/search_engines/search_provider_install_state_message_filter.cc

Issue 8570022: base::Bind() conversion for chrome/browser/search_engines (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/search_engines/search_provider_install_state_message_filter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search_engines/search_provider_install_state_message_filter.cc
diff --git a/chrome/browser/search_engines/search_provider_install_state_message_filter.cc b/chrome/browser/search_engines/search_provider_install_state_message_filter.cc
index bb8b06dc190494ecd6e9170727830730ccca30a2..c961c015ecb0bc45579b1fba90d4b2f028dadbf4 100644
--- a/chrome/browser/search_engines/search_provider_install_state_message_filter.cc
+++ b/chrome/browser/search_engines/search_provider_install_state_message_filter.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/search_engines/search_provider_install_state_message_filter.h"
+#include "base/bind.h"
#include "base/logging.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/render_messages.h"
@@ -19,8 +20,7 @@ SearchProviderInstallStateMessageFilter::
SearchProviderInstallStateMessageFilter(
int render_process_id,
Profile* profile)
- : ALLOW_THIS_IN_INITIALIZER_LIST(
- reply_with_provider_install_state_factory_(this)),
+ : ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
provider_data_(profile->GetWebDataService(Profile::EXPLICIT_ACCESS),
content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
content::Source<RenderProcessHost>(
@@ -88,9 +88,10 @@ SearchProviderInstallStateMessageFilter::OnMsgGetSearchProviderInstallState(
const GURL& requested_host,
IPC::Message* reply_msg) {
provider_data_.CallWhenLoaded(
- reply_with_provider_install_state_factory_.NewRunnableMethod(
+ base::Bind(
&SearchProviderInstallStateMessageFilter::
ReplyWithProviderInstallState,
+ weak_factory_.GetWeakPtr(),
page_location,
requested_host,
reply_msg));
« no previous file with comments | « chrome/browser/search_engines/search_provider_install_state_message_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698