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_UPDATER_OBSERVER_H_ |
6 #define CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_PROFILE_OBSERVER_H_ | 6 #define CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_UPDATER_OBSERVER_H_ |
7 | 7 |
8 #include "content/public/browser/notification_observer.h" | 8 #include "content/public/browser/notification_observer.h" |
9 #include "content/public/browser/notification_registrar.h" | 9 #include "content/public/browser/notification_registrar.h" |
10 | 10 |
11 class PnaclComponentInstaller; | 11 class PnaclComponentInstaller; |
12 | 12 |
13 // Monitors profile switching for ChromeOS to check the per-user | 13 // Monitors the component updater service, so that the callbacks registered |
14 // version of PNaCl. | 14 // against the PnaclComponentInstaller can be notified of events. |
15 class PnaclProfileObserver : public content::NotificationObserver { | 15 class PnaclUpdaterObserver : public content::NotificationObserver { |
16 public: | 16 public: |
17 explicit PnaclProfileObserver(PnaclComponentInstaller* installer); | 17 explicit PnaclUpdaterObserver(PnaclComponentInstaller* installer); |
18 virtual ~PnaclProfileObserver(); | 18 virtual ~PnaclUpdaterObserver(); |
19 | 19 |
20 virtual void Observe( | 20 virtual void Observe( |
21 int type, | 21 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 private: | 25 private: |
26 content::NotificationRegistrar registrar_; | 26 content::NotificationRegistrar registrar_; |
27 PnaclComponentInstaller* pnacl_installer_; | 27 PnaclComponentInstaller* pnacl_installer_; |
28 DISALLOW_COPY_AND_ASSIGN(PnaclProfileObserver); | 28 DISALLOW_COPY_AND_ASSIGN(PnaclUpdaterObserver); |
29 }; | 29 }; |
30 | 30 |
31 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_PROFILE_OBSERVER_H_ | 31 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_UPDATER_OBSERVER_H_ |
OLD | NEW |