| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/chromeos/enterprise_extension_observer.h" | 5 #include "chrome/browser/chromeos/enterprise_extension_observer.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "chrome/browser/chromeos/cros/cros_library.h" | 9 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 const content::NotificationSource& source, | 30 const content::NotificationSource& source, |
| 31 const content::NotificationDetails& details) { | 31 const content::NotificationDetails& details) { |
| 32 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 32 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 33 DCHECK(type == chrome::NOTIFICATION_EXTENSION_INSTALLED); | 33 DCHECK(type == chrome::NOTIFICATION_EXTENSION_INSTALLED); |
| 34 if (content::Source<Profile>(source).ptr() != profile_) { | 34 if (content::Source<Profile>(source).ptr() != profile_) { |
| 35 return; | 35 return; |
| 36 } | 36 } |
| 37 extensions::Extension* extension = | 37 extensions::Extension* extension = |
| 38 content::Details<extensions::Extension>(details).ptr(); | 38 content::Details<extensions::Extension>(details).ptr(); |
| 39 if (extension->location() != | 39 if (extension->location() != |
| 40 extensions::Extension::EXTERNAL_POLICY_DOWNLOAD) { | 40 extensions::Manifest::EXTERNAL_POLICY_DOWNLOAD) { |
| 41 return; | 41 return; |
| 42 } | 42 } |
| 43 BrowserThread::PostTask( | 43 BrowserThread::PostTask( |
| 44 BrowserThread::FILE, | 44 BrowserThread::FILE, |
| 45 FROM_HERE, | 45 FROM_HERE, |
| 46 base::Bind( | 46 base::Bind( |
| 47 &EnterpriseExtensionObserver::CheckExtensionAndNotifyEntd, | 47 &EnterpriseExtensionObserver::CheckExtensionAndNotifyEntd, |
| 48 extension->path())); | 48 extension->path())); |
| 49 } | 49 } |
| 50 | 50 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 | 63 |
| 64 // static | 64 // static |
| 65 void EnterpriseExtensionObserver::NotifyEntd() { | 65 void EnterpriseExtensionObserver::NotifyEntd() { |
| 66 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 66 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 67 DBusThreadManager::Get()->GetSessionManagerClient()->RestartEntd(); | 67 DBusThreadManager::Get()->GetSessionManagerClient()->RestartEntd(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace chromeos | 70 } // namespace chromeos |
| OLD | NEW |