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

Unified Diff: chrome/browser/extensions/extension_function.h

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 | « no previous file | chrome/browser/extensions/extension_function_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_function.h
diff --git a/chrome/browser/extensions/extension_function.h b/chrome/browser/extensions/extension_function.h
index 9ec4ea875f4ca861edb1071a62526ecec301cc93..aed4dda102606a06bd87340f089cfc3dd446d2be 100644
--- a/chrome/browser/extensions/extension_function.h
+++ b/chrome/browser/extensions/extension_function.h
@@ -81,11 +81,12 @@ class ExtensionFunction
virtual void GetQuotaLimitHeuristics(
std::list<QuotaLimitHeuristic*>* heuristics) const {}
- void set_dispatcher_peer(ExtensionFunctionDispatcher::Peer* peer) {
- peer_ = peer;
+ void set_dispatcher(
+ const base::WeakPtr<ExtensionFunctionDispatcher>& dispatcher) {
+ dispatcher_ = dispatcher;
}
ExtensionFunctionDispatcher* dispatcher() const {
- return peer_->dispatcher_;
+ return dispatcher_.get();
}
void set_request_id(int request_id) { request_id_ = request_id; }
@@ -135,8 +136,8 @@ class ExtensionFunction
// shutdown when there are no active windows.
Browser* GetCurrentBrowser();
- // The peer to the dispatcher that will service this extension function call.
- scoped_refptr<ExtensionFunctionDispatcher::Peer> peer_;
+ // The dispatcher that will service this extension function call.
+ base::WeakPtr<ExtensionFunctionDispatcher> dispatcher_;
// The RenderViewHost we will send responses too.
RenderViewHost* render_view_host_;
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_function_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698