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_data_provider.h" | 5 #include "extensions/browser/updater/update_data_provider.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 info->installer = new UpdateInstallShim( | 53 info->installer = new UpdateInstallShim( |
54 id, extension->path(), | 54 id, extension->path(), |
55 base::Bind(&UpdateDataProvider::RunInstallCallback, this)); | 55 base::Bind(&UpdateDataProvider::RunInstallCallback, this)); |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 void UpdateDataProvider::RunInstallCallback(const std::string& extension_id, | 59 void UpdateDataProvider::RunInstallCallback(const std::string& extension_id, |
60 const base::FilePath& temp_dir) { | 60 const base::FilePath& temp_dir) { |
61 if (!context_) { | 61 if (!context_) { |
62 base::PostTaskWithTraits( | 62 base::PostTaskWithTraits( |
63 FROM_HERE, base::TaskTraits().MayBlock().WithPriority( | 63 FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND}, |
64 base::TaskPriority::BACKGROUND), | |
65 base::Bind(base::IgnoreResult(&base::DeleteFile), temp_dir, false)); | 64 base::Bind(base::IgnoreResult(&base::DeleteFile), temp_dir, false)); |
66 return; | 65 return; |
67 } else { | 66 } else { |
68 callback_.Run(context_, extension_id, temp_dir); | 67 callback_.Run(context_, extension_id, temp_dir); |
69 } | 68 } |
70 } | 69 } |
71 | 70 |
72 } // namespace extensions | 71 } // namespace extensions |
OLD | NEW |