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

Unified Diff: apps/app_shim/app_shim_host_manager_mac.h

Issue 20065004: Make AppShimHostManager a RefCountedThreadSafe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment Created 7 years, 3 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
Index: apps/app_shim/app_shim_host_manager_mac.h
diff --git a/apps/app_shim/app_shim_host_manager_mac.h b/apps/app_shim/app_shim_host_manager_mac.h
index 1c088f50cdd05492da254dd3f57bd5a58d460d90..b8e9e04c5420e9e6a54188eefdb6954f55b3318f 100644
--- a/apps/app_shim/app_shim_host_manager_mac.h
+++ b/apps/app_shim/app_shim_host_manager_mac.h
@@ -6,23 +6,25 @@
#define CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_MANAGER_MAC_H_
#include "apps/app_shim/extension_app_shim_handler_mac.h"
-#include "base/memory/weak_ptr.h"
+#include "base/memory/ref_counted.h"
#include "ipc/ipc_channel_factory.h"
// The AppShimHostManager receives connections from app shims on a UNIX
// socket (|factory_|) and creates a helper object to manage the connection.
class AppShimHostManager
: public IPC::ChannelFactory::Delegate,
- public base::SupportsWeakPtr<AppShimHostManager> {
+ public base::RefCountedThreadSafe<AppShimHostManager> {
public:
AppShimHostManager();
- virtual ~AppShimHostManager();
apps::ExtensionAppShimHandler* extension_app_shim_handler() {
return &extension_app_shim_handler_;
}
private:
+ friend class base::RefCountedThreadSafe<AppShimHostManager>;
+ virtual ~AppShimHostManager();
+
// IPC::ChannelFactory::Delegate implementation.
virtual void OnClientConnected(const IPC::ChannelHandle& handle) OVERRIDE;
virtual void OnListenError() OVERRIDE;
« no previous file with comments | « no previous file | apps/app_shim/app_shim_host_manager_mac.mm » ('j') | apps/app_shim/app_shim_host_manager_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698