OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_COMPONENT_UPDATER_PNACL_PNACL_PROFILE_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_PROFILE_OBSERVER_H_ |
6 #define CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_PROFILE_OBSERVER_H_ | 6 #define CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_PROFILE_OBSERVER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.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 namespace component_updater { |
| 13 |
12 class PnaclComponentInstaller; | 14 class PnaclComponentInstaller; |
13 | 15 |
14 // Monitors profile switching for ChromeOS to check the per-user | 16 // Monitors profile switching for ChromeOS to check the per-user |
15 // version of PNaCl. | 17 // version of PNaCl. |
16 class PnaclProfileObserver : public content::NotificationObserver { | 18 class PnaclProfileObserver : public content::NotificationObserver { |
17 public: | 19 public: |
18 explicit PnaclProfileObserver(PnaclComponentInstaller* installer); | 20 explicit PnaclProfileObserver(PnaclComponentInstaller* installer); |
19 virtual ~PnaclProfileObserver(); | 21 virtual ~PnaclProfileObserver(); |
20 | 22 |
21 virtual void Observe( | 23 virtual void Observe( |
22 int type, | 24 int type, |
23 const content::NotificationSource& source, | 25 const content::NotificationSource& source, |
24 const content::NotificationDetails& details) OVERRIDE; | 26 const content::NotificationDetails& details) OVERRIDE; |
25 | 27 |
26 private: | 28 private: |
27 content::NotificationRegistrar registrar_; | 29 content::NotificationRegistrar registrar_; |
28 PnaclComponentInstaller* pnacl_installer_; | 30 PnaclComponentInstaller* pnacl_installer_; |
29 DISALLOW_COPY_AND_ASSIGN(PnaclProfileObserver); | 31 DISALLOW_COPY_AND_ASSIGN(PnaclProfileObserver); |
30 }; | 32 }; |
31 | 33 |
| 34 } // namespace component_updater |
| 35 |
32 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_PROFILE_OBSERVER_H_ | 36 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_PROFILE_OBSERVER_H_ |
OLD | NEW |