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

Side by Side Diff: mojo/common/data_pipe_utils.cc

Issue 559743002: Cleanup: Use base/files/file_util.h instead of base/file_util.h in cc/, chromecast/, cloud_print/, … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win Created 6 years, 3 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 | « mojo/apps/js/test/js_to_cpp_unittest.cc ('k') | mojo/common/test/test_support_impl.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 2014 The Chromium Authors. All rights reserved. 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 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 "mojo/common/data_pipe_utils.h" 5 #include "mojo/common/data_pipe_utils.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h"
11 #include "base/files/scoped_file.h" 11 #include "base/files/scoped_file.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/task_runner_util.h" 13 #include "base/task_runner_util.h"
14 14
15 namespace mojo { 15 namespace mojo {
16 namespace common { 16 namespace common {
17 17
18 bool BlockingCopyToFile(ScopedDataPipeConsumerHandle source, 18 bool BlockingCopyToFile(ScopedDataPipeConsumerHandle source,
19 const base::FilePath& destination) { 19 const base::FilePath& destination) {
20 base::ScopedFILE fp(base::OpenFile(destination, "wb")); 20 base::ScopedFILE fp(base::OpenFile(destination, "wb"));
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 const base::Callback<void(bool)>& callback) { 62 const base::Callback<void(bool)>& callback) {
63 base::PostTaskAndReplyWithResult( 63 base::PostTaskAndReplyWithResult(
64 task_runner, 64 task_runner,
65 FROM_HERE, 65 FROM_HERE,
66 base::Bind(&BlockingCopyToFile, base::Passed(&source), destination), 66 base::Bind(&BlockingCopyToFile, base::Passed(&source), destination),
67 callback); 67 callback);
68 } 68 }
69 69
70 } // namespace common 70 } // namespace common
71 } // namespace mojo 71 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/apps/js/test/js_to_cpp_unittest.cc ('k') | mojo/common/test/test_support_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698