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 "chrome/browser/platform_util.h" | 5 #include "chrome/browser/platform_util.h" |
6 | 6 |
7 #include "base/files/file.h" | 7 #include "base/files/file.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/task_scheduler/post_task.h" | 10 #include "base/task_scheduler/post_task.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 } | 54 } |
55 | 55 |
56 } // namespace internal | 56 } // namespace internal |
57 | 57 |
58 void OpenItem(Profile* profile, | 58 void OpenItem(Profile* profile, |
59 const base::FilePath& full_path, | 59 const base::FilePath& full_path, |
60 OpenItemType item_type, | 60 OpenItemType item_type, |
61 const OpenOperationCallback& callback) { | 61 const OpenOperationCallback& callback) { |
62 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 62 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
63 base::PostTaskWithTraits(FROM_HERE, | 63 base::PostTaskWithTraits(FROM_HERE, |
64 base::TaskTraits().MayBlock().WithPriority( | 64 {base::MayBlock(), base::TaskPriority::BACKGROUND}, |
65 base::TaskPriority::BACKGROUND), | |
66 base::BindOnce(&VerifyAndOpenItemOnBlockingThread, | 65 base::BindOnce(&VerifyAndOpenItemOnBlockingThread, |
67 full_path, item_type, callback)); | 66 full_path, item_type, callback)); |
68 } | 67 } |
69 | 68 |
70 } // namespace platform_util | 69 } // namespace platform_util |
OLD | NEW |