OLD | NEW |
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 #ifndef CHROME_BROWSER_GOOGLE_DID_RUN_UPDATER_WIN_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_DID_RUN_UPDATER_WIN_H_ |
6 #define CHROME_BROWSER_GOOGLE_DID_RUN_UPDATER_WIN_H_ | 6 #define CHROME_BROWSER_GOOGLE_DID_RUN_UPDATER_WIN_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "content/public/browser/notification_observer.h" | 9 #include "content/public/browser/notification_observer.h" |
10 #include "content/public/browser/notification_registrar.h" | 10 #include "content/public/browser/notification_registrar.h" |
11 | 11 |
12 // Updates Chrome's "did run" state periodically when the process is in use. | 12 // Updates Chrome's "did run" state periodically when the process is in use. |
13 // The creation of renderers is used as a proxy for "is the browser in use." | 13 // The creation of renderers is used as a proxy for "is the browser in use." |
14 class DidRunUpdater : public content::NotificationObserver { | 14 class DidRunUpdater : public content::NotificationObserver { |
15 public: | 15 public: |
16 DidRunUpdater(); | 16 DidRunUpdater(); |
17 ~DidRunUpdater() override; | 17 ~DidRunUpdater() override; |
18 | 18 |
19 private: | 19 private: |
20 // content::NotificationObserver: | 20 // content::NotificationObserver: |
21 void Observe(int type, | 21 void Observe(int type, |
22 const content::NotificationSource& source, | 22 const content::NotificationSource& source, |
23 const content::NotificationDetails& details) override; | 23 const content::NotificationDetails& details) override; |
24 | 24 |
25 // True if the process is running from a system-level installation. | |
26 bool system_level_; | |
27 content::NotificationRegistrar registrar_; | 25 content::NotificationRegistrar registrar_; |
28 | 26 |
29 DISALLOW_COPY_AND_ASSIGN(DidRunUpdater); | 27 DISALLOW_COPY_AND_ASSIGN(DidRunUpdater); |
30 }; | 28 }; |
31 | 29 |
32 #endif // CHROME_BROWSER_GOOGLE_DID_RUN_UPDATER_WIN_H_ | 30 #endif // CHROME_BROWSER_GOOGLE_DID_RUN_UPDATER_WIN_H_ |
OLD | NEW |