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

Side by Side Diff: chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chromeos.cc

Issue 2858073002: Use constexpr TaskTraits constructor in chrome. (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 | « chrome/browser/mac/keystone_glue.mm ('k') | chrome/browser/memory_details.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/media_galleries/chromeos/mtp_device_delegate_impl_chrom eos.h" 5 #include "chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chrom eos.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 // Closes |file_descriptor| on file thread. 344 // Closes |file_descriptor| on file thread.
345 void CloseFileDescriptor(const int file_descriptor) { 345 void CloseFileDescriptor(const int file_descriptor) {
346 DCHECK_CURRENTLY_ON(content::BrowserThread::FILE); 346 DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
347 347
348 IGNORE_EINTR(close(file_descriptor)); 348 IGNORE_EINTR(close(file_descriptor));
349 } 349 }
350 350
351 // Deletes a temporary file |file_path|. 351 // Deletes a temporary file |file_path|.
352 void DeleteTemporaryFile(const base::FilePath& file_path) { 352 void DeleteTemporaryFile(const base::FilePath& file_path) {
353 base::PostTaskWithTraits(FROM_HERE, 353 base::PostTaskWithTraits(FROM_HERE,
354 base::TaskTraits().MayBlock().WithPriority( 354 {base::MayBlock(), base::TaskPriority::BACKGROUND},
355 base::TaskPriority::BACKGROUND),
356 base::Bind(base::IgnoreResult(base::DeleteFile), 355 base::Bind(base::IgnoreResult(base::DeleteFile),
357 file_path, false /* not recursive*/)); 356 file_path, false /* not recursive*/));
358 } 357 }
359 358
360 // A fake callback to be passed as CopyFileProgressCallback. 359 // A fake callback to be passed as CopyFileProgressCallback.
361 void FakeCopyFileProgressCallback(int64_t size) {} 360 void FakeCopyFileProgressCallback(int64_t size) {}
362 361
363 } // namespace 362 } // namespace
364 363
365 MTPDeviceDelegateImplLinux::PendingTaskInfo::PendingTaskInfo( 364 MTPDeviceDelegateImplLinux::PendingTaskInfo::PendingTaskInfo(
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1894 } 1893 }
1895 } 1894 }
1896 1895
1897 void CreateMTPDeviceAsyncDelegate( 1896 void CreateMTPDeviceAsyncDelegate(
1898 const std::string& device_location, 1897 const std::string& device_location,
1899 const bool read_only, 1898 const bool read_only,
1900 const CreateMTPDeviceAsyncDelegateCallback& callback) { 1899 const CreateMTPDeviceAsyncDelegateCallback& callback) {
1901 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); 1900 DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
1902 callback.Run(new MTPDeviceDelegateImplLinux(device_location, read_only)); 1901 callback.Run(new MTPDeviceDelegateImplLinux(device_location, read_only));
1903 } 1902 }
OLDNEW
« no previous file with comments | « chrome/browser/mac/keystone_glue.mm ('k') | chrome/browser/memory_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698