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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/fake_drive_service_helper.cc

Issue 184563006: Move WriteFile and WriteFileDescriptor from file_util to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 "chrome/browser/sync_file_system/drive_backend/fake_drive_service_helpe r.h" 5 #include "chrome/browser/sync_file_system/drive_backend/fake_drive_service_helpe r.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 ASSERT_TRUE(base_dir_.CreateUniqueTempDir()); 337 ASSERT_TRUE(base_dir_.CreateUniqueTempDir());
338 temp_dir_ = base_dir_.path().Append(FPL("tmp")); 338 temp_dir_ = base_dir_.path().Append(FPL("tmp"));
339 ASSERT_TRUE(base::CreateDirectory(temp_dir_)); 339 ASSERT_TRUE(base::CreateDirectory(temp_dir_));
340 } 340 }
341 341
342 base::FilePath FakeDriveServiceHelper::WriteToTempFile( 342 base::FilePath FakeDriveServiceHelper::WriteToTempFile(
343 const std::string& content) { 343 const std::string& content) {
344 base::FilePath temp_file; 344 base::FilePath temp_file;
345 EXPECT_TRUE(base::CreateTemporaryFileInDir(temp_dir_, &temp_file)); 345 EXPECT_TRUE(base::CreateTemporaryFileInDir(temp_dir_, &temp_file));
346 EXPECT_EQ(static_cast<int>(content.size()), 346 EXPECT_EQ(static_cast<int>(content.size()),
347 file_util::WriteFile(temp_file, content.data(), content.size())); 347 base::WriteFile(temp_file, content.data(), content.size()));
348 return temp_file; 348 return temp_file;
349 } 349 }
350 350
351 } // namespace drive_backend 351 } // namespace drive_backend
352 } // namespace sync_file_system 352 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698