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

Side by Side Diff: chrome/browser/suspend_controller.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 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // The SuspendController keeps track of actions related to the computer going
6 // into power savings mode. Its purpose right now is to close all network
7 // requests and prevent creation of new requests until the computer resumes.
8
9 #ifndef CHROME_BROWSER_SUSPEND_CONTROLLER_H__
10 #define CHROME_BROWSER_SUSPEND_CONTROLLER_H__
11
12 #include "base/basictypes.h"
13 #include "chrome/browser/profile.h"
14
15 class Profile;
16
17 // The browser process owns the only instance of this class.
18 class SuspendController : public base::RefCountedThreadSafe<SuspendController> {
19 public:
20 SuspendController() {}
21 ~SuspendController() {}
22
23 // Called when the system is going to be suspended.
24 static void OnSuspend(Profile* profile);
25
26 // Called when the system has been resumed.
27 static void OnResume(Profile* profile);
28
29 private:
30 // Run on the io_thread.
31 void StopRequests(Profile* profile);
32 void AllowNewRequests(Profile* profile);
33
34 static bool is_suspended_;
35
36 DISALLOW_EVIL_CONSTRUCTORS(SuspendController);
37 };
38
39 #endif // CHROME_BROWSER_SUSPEND_CONTROLLER_H__
40
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service.cc ('k') | chrome/browser/suspend_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698