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

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

Issue 10272019: Add an arbitrary delay before unloading lazy background pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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: chrome/browser/extensions/extension_process_manager.h
diff --git a/chrome/browser/extensions/extension_process_manager.h b/chrome/browser/extensions/extension_process_manager.h
index 9e9df0803813a0930e64a16f353bb23fa366ff48..03c58ec87c002f288f805e642662d3184d692dcc 100644
--- a/chrome/browser/extensions/extension_process_manager.h
+++ b/chrome/browser/extensions/extension_process_manager.h
@@ -12,6 +12,7 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "content/public/common/view_type.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -182,7 +183,8 @@ class ExtensionProcessManager : public content::NotificationObserver {
// These are called when the extension transitions between idle and active.
// They control the process of closing the background page when idle.
- void OnLazyBackgroundPageIdle(const std::string& extension_id);
+ void OnLazyBackgroundPageIdle(const std::string& extension_id,
+ int close_sequence_id);
void OnLazyBackgroundPageActive(const std::string& extension_id);
// Updates a potentially-registered RenderViewHost once it has been
@@ -192,6 +194,8 @@ class ExtensionProcessManager : public content::NotificationObserver {
BackgroundPageDataMap background_page_data_;
+ base::WeakPtrFactory<ExtensionProcessManager> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager);
};

Powered by Google App Engine
This is Rietveld 408576698