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

Side by Side Diff: chrome/browser/component_updater/pnacl/pnacl_profile_observer.cc

Issue 338403002: Remove pnacl_profile_observer from pnacl's use of component updater. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months 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) 2013 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 #include "chrome/browser/component_updater/pnacl/pnacl_profile_observer.h"
6
7 #include "base/logging.h"
8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h"
10 #include "content/public/browser/notification_service.h"
11
12 namespace component_updater {
13
14 PnaclProfileObserver::PnaclProfileObserver(PnaclComponentInstaller* installer)
15 : pnacl_installer_(installer) {
16 // We only need to observe NOTIFICATION_LOGIN_USER_CHANGED for ChromeOS
17 // (and it's only defined for ChromeOS).
18 #if defined(OS_CHROMEOS)
19 registrar_.Add(this,
20 chrome::NOTIFICATION_LOGIN_USER_CHANGED,
21 content::NotificationService::AllSources());
22 #endif
23 }
24
25 PnaclProfileObserver::~PnaclProfileObserver() {
26 }
27
28 void PnaclProfileObserver::Observe(
29 int type,
30 const content::NotificationSource& source,
31 const content::NotificationDetails& details) {
32 #if defined(OS_CHROMEOS)
33 if (type == chrome::NOTIFICATION_LOGIN_USER_CHANGED) {
34 pnacl_installer_->ReRegisterPnacl();
35 return;
36 }
37 NOTREACHED() << "Unexpected notification observed";
38 #endif
39 }
40
41 } // namespace component_updater
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/pnacl/pnacl_profile_observer.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698