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

Unified Diff: chrome/browser/background/background_mode_manager.h

Issue 1128033002: Avoiding use of NOTIFICATION_EXTENSION_READY_DEPRECATED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: chrome/browser/background/background_mode_manager.h
diff --git a/chrome/browser/background/background_mode_manager.h b/chrome/browser/background/background_mode_manager.h
index a815ccd6969acd28b74ed00c8351ad225a0b152d..cc9f804dc1d30d25ec59fc63cfd75b4e8c51ba75 100644
--- a/chrome/browser/background/background_mode_manager.h
+++ b/chrome/browser/background/background_mode_manager.h
@@ -9,6 +9,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_vector.h"
+#include "base/memory/weak_ptr.h"
#include "base/prefs/pref_change_registrar.h"
#include "chrome/browser/background/background_application_list_model.h"
#include "chrome/browser/profiles/profile_info_cache_observer.h"
@@ -113,7 +114,6 @@ class BackgroundModeManager
BalloonDisplay);
FRIEND_TEST_ALL_PREFIXES(BackgroundAppBrowserTest,
ReloadBackgroundApp);
-
Lei Zhang 2015/05/06 21:35:49 Please leave this blank line in.
Pranay 2015/05/07 03:24:46 Done.
class BackgroundModeData : public StatusIconMenuModel::Delegate {
public:
explicit BackgroundModeData(
@@ -195,6 +195,9 @@ class BackgroundModeManager
const content::NotificationSource& source,
const content::NotificationDetails& details) override;
+ // Called when ExtensionSystem is ready.
+ void OnExtensionsReady();
+
// Called when the kBackgroundModeEnabled preference changes.
void OnBackgroundModeEnabledPrefChanged();
@@ -356,6 +359,8 @@ class BackgroundModeManager
// Set to true when background mode is keeping Chrome alive.
bool keeping_alive_;
+ base::WeakPtrFactory<BackgroundModeManager> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(BackgroundModeManager);
};

Powered by Google App Engine
This is Rietveld 408576698