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

Unified Diff: chrome/browser/extensions/extension_function_dispatcher.cc

Issue 6990050: Small cleanup to move ExtensionFunctionDispatcher to use WeakPtr instead of Peer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 months 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/extensions/extension_function_dispatcher.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_function_dispatcher.cc
diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc
index cf6f61969cc6fc499ebe0205e6c3ba4369d904af..62eabd09ce2915f67076093fc120c3f7a112a0b7 100644
--- a/chrome/browser/extensions/extension_function_dispatcher.cc
+++ b/chrome/browser/extensions/extension_function_dispatcher.cc
@@ -398,12 +398,10 @@ void ExtensionFunctionDispatcher::ResetFunctions() {
ExtensionFunctionDispatcher::ExtensionFunctionDispatcher(Profile* profile,
Delegate* delegate)
: profile_(profile),
- delegate_(delegate),
- ALLOW_THIS_IN_INITIALIZER_LIST(peer_(new Peer(this))) {
+ delegate_(delegate) {
}
ExtensionFunctionDispatcher::~ExtensionFunctionDispatcher() {
- peer_->dispatcher_ = NULL;
}
Browser* ExtensionFunctionDispatcher::GetCurrentBrowser(
@@ -482,7 +480,7 @@ void ExtensionFunctionDispatcher::Dispatch(
scoped_refptr<ExtensionFunction> function(
FactoryRegistry::GetInstance()->NewFunction(params.name));
function->SetRenderViewHost(render_view_host);
- function->set_dispatcher_peer(peer_);
+ function->set_dispatcher(AsWeakPtr());
function->set_profile(profile_);
function->set_extension_id(extension->id());
function->SetArgs(&params.arguments);
« no previous file with comments | « chrome/browser/extensions/extension_function_dispatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698