| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "extensions/browser/updater/update_install_shim.h" | 5 #include "extensions/browser/updater/update_install_shim.h" |
| 6 | 6 |
| 7 #include "base/files/file_enumerator.h" | 7 #include "base/files/file_enumerator.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 bool UpdateInstallShim::Uninstall() { | 73 bool UpdateInstallShim::Uninstall() { |
| 74 NOTREACHED(); | 74 NOTREACHED(); |
| 75 return false; | 75 return false; |
| 76 } | 76 } |
| 77 | 77 |
| 78 UpdateInstallShim::~UpdateInstallShim() {} | 78 UpdateInstallShim::~UpdateInstallShim() {} |
| 79 | 79 |
| 80 void UpdateInstallShim::RunCallbackOnUIThread(const base::FilePath& temp_dir) { | 80 void UpdateInstallShim::RunCallbackOnUIThread(const base::FilePath& temp_dir) { |
| 81 if (callback_.is_null()) { | 81 if (callback_.is_null()) { |
| 82 base::PostTaskWithTraits(FROM_HERE, | 82 base::PostTaskWithTraits(FROM_HERE, |
| 83 base::TaskTraits().MayBlock().WithPriority( | 83 {base::MayBlock(), base::TaskPriority::BACKGROUND}, |
| 84 base::TaskPriority::BACKGROUND), | |
| 85 base::Bind(base::IgnoreResult(&base::DeleteFile), | 84 base::Bind(base::IgnoreResult(&base::DeleteFile), |
| 86 temp_dir, true /*recursive */)); | 85 temp_dir, true /*recursive */)); |
| 87 return; | 86 return; |
| 88 } | 87 } |
| 89 callback_.Run(extension_id_, temp_dir); | 88 callback_.Run(extension_id_, temp_dir); |
| 90 } | 89 } |
| 91 | 90 |
| 92 } // namespace extensions | 91 } // namespace extensions |
| OLD | NEW |