1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MOJO_SHELL_DATA_PIPE_UTILS_H_
6 #define MOJO_SHELL_DATA_PIPE_UTILS_H_
8 #include "base/callback_forward.h"
9 #include "mojo/common/mojo_common_export.h"
10 #include "mojo/public/cpp/system/core.h"
20 // Asynchronously copies data from source to the destination file. The given
21 // |callback| is run upon completion. File writes will be scheduled to the
22 // given |task_runner|.
23 void MOJO_COMMON_EXPORT
CopyToFile(
24 ScopedDataPipeConsumerHandle source
,
25 const base::FilePath
& destination
,
26 base::TaskRunner
* task_runner
,
27 const base::Callback
<void(bool /*success*/)>& callback
);
32 #endif // MOJO_SHELL_DATA_PIPE_UTILS_H_