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

Side by Side Diff: extensions/browser/updater/update_install_shim.cc

Issue 2859933002: Use constexpr TaskTraits constructor in extensions. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « extensions/browser/updater/update_data_provider.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « extensions/browser/updater/update_data_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698