| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 FROM_HERE, | 46 FROM_HERE, |
| 47 base::Bind( | 47 base::Bind( |
| 48 &EnterpriseExtensionObserver::CheckExtensionAndNotifyEntd, | 48 &EnterpriseExtensionObserver::CheckExtensionAndNotifyEntd, |
| 49 extension->path())); | 49 extension->path())); |
| 50 } | 50 } |
| 51 | 51 |
| 52 // static | 52 // static |
| 53 void EnterpriseExtensionObserver::CheckExtensionAndNotifyEntd( | 53 void EnterpriseExtensionObserver::CheckExtensionAndNotifyEntd( |
| 54 const base::FilePath& path) { | 54 const base::FilePath& path) { |
| 55 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 55 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| 56 if (file_util::PathExists( | 56 if (base::PathExists( |
| 57 path.Append(FILE_PATH_LITERAL("isa-cros-policy")))) { | 57 path.Append(FILE_PATH_LITERAL("isa-cros-policy")))) { |
| 58 BrowserThread::PostTask( | 58 BrowserThread::PostTask( |
| 59 BrowserThread::UI, | 59 BrowserThread::UI, |
| 60 FROM_HERE, | 60 FROM_HERE, |
| 61 base::Bind(&EnterpriseExtensionObserver::NotifyEntd)); | 61 base::Bind(&EnterpriseExtensionObserver::NotifyEntd)); |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 | 64 |
| 65 // static | 65 // static |
| 66 void EnterpriseExtensionObserver::NotifyEntd() { | 66 void EnterpriseExtensionObserver::NotifyEntd() { |
| 67 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 67 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 68 DBusThreadManager::Get()->GetSessionManagerClient()->RestartEntd(); | 68 DBusThreadManager::Get()->GetSessionManagerClient()->RestartEntd(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 } // namespace chromeos | 71 } // namespace chromeos |
| OLD | NEW |