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

Unified Diff: chrome/browser/profile_manager.h

Issue 12817: A new copy of the old system monitor changelist. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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 | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/profile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profile_manager.h
===================================================================
--- chrome/browser/profile_manager.h (revision 6119)
+++ chrome/browser/profile_manager.h (working copy)
@@ -12,6 +12,9 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/message_loop.h"
+#include "base/non_thread_safe.h"
+#include "base/system_monitor.h"
#include "base/values.h"
#include "chrome/browser/profile.h"
@@ -57,7 +60,8 @@
DISALLOW_EVIL_CONSTRUCTORS(AvailableProfile);
};
-class ProfileManager {
+class ProfileManager : public NonThreadSafe,
+ public base::SystemMonitor::PowerObserver {
public:
ProfileManager();
virtual ~ProfileManager();
@@ -122,6 +126,11 @@
// Creates a new window with the given profile.
void NewWindowWithProfile(Profile* profile);
+ // PowerObserver notifications
+ void OnPowerStateChange(base::SystemMonitor*) {}
+ void OnSuspend(base::SystemMonitor*);
+ void OnResume(base::SystemMonitor*);
+
// ------------------ static utility functions -------------------
// Returns the path to the profile directory based on the user data directory.
@@ -157,6 +166,11 @@
// or NULL if no match is found.
AvailableProfile* GetAvailableProfileByID(const std::wstring& id);
+ // Hooks to suspend/resume per-profile network traffic.
+ // These must be called on the IO thread.
+ static void SuspendProfile(Profile*);
+ static void ResumeProfile(Profile*);
+
// We keep a simple vector of profiles rather than something fancier
// because we expect there to be a small number of profiles active.
ProfileVector profiles_;
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698