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

Side by Side Diff: extensions/browser/updater/update_data_provider.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
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_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
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
OLDNEW
« no previous file with comments | « extensions/browser/updater/update_client_config.cc ('k') | extensions/browser/updater/update_install_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698