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

Side by Side Diff: extensions/browser/mojo/keep_alive_impl.cc

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/browser/mojo/keep_alive_impl.h" 5 #include "extensions/browser/mojo/keep_alive_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "extensions/browser/extension_registry.h" 10 #include "extensions/browser/extension_registry.h"
(...skipping 20 matching lines...) Expand all
31 binding_.set_connection_error_handler( 31 binding_.set_connection_error_handler(
32 base::Bind(&KeepAliveImpl::OnDisconnected, base::Unretained(this))); 32 base::Bind(&KeepAliveImpl::OnDisconnected, base::Unretained(this)));
33 extension_registry_observer_.Add(ExtensionRegistry::Get(context_)); 33 extension_registry_observer_.Add(ExtensionRegistry::Get(context_));
34 } 34 }
35 35
36 KeepAliveImpl::~KeepAliveImpl() = default; 36 KeepAliveImpl::~KeepAliveImpl() = default;
37 37
38 void KeepAliveImpl::OnExtensionUnloaded( 38 void KeepAliveImpl::OnExtensionUnloaded(
39 content::BrowserContext* browser_context, 39 content::BrowserContext* browser_context,
40 const Extension* extension, 40 const Extension* extension,
41 UnloadedExtensionInfo::Reason reason) { 41 UnloadedExtensionReason reason) {
42 if (browser_context == context_ && extension == extension_) 42 if (browser_context == context_ && extension == extension_)
43 delete this; 43 delete this;
44 } 44 }
45 45
46 void KeepAliveImpl::OnShutdown(ExtensionRegistry* registry) { 46 void KeepAliveImpl::OnShutdown(ExtensionRegistry* registry) {
47 delete this; 47 delete this;
48 } 48 }
49 49
50 void KeepAliveImpl::OnDisconnected() { 50 void KeepAliveImpl::OnDisconnected() {
51 ProcessManager::Get(context_)->DecrementLazyKeepaliveCount(extension_); 51 ProcessManager::Get(context_)->DecrementLazyKeepaliveCount(extension_);
52 delete this; 52 delete this;
53 } 53 }
54 54
55 } // namespace extensions 55 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/mojo/keep_alive_impl.h ('k') | extensions/browser/mojo/keep_alive_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698