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

Side by Side Diff: chrome/browser/extensions/api/image_writer_private/test_utils.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/extensions/api/image_writer_private/test_utils.h" 5 #include "chrome/browser/extensions/api/image_writer_private/test_utils.h"
6 6
7 #if defined(OS_CHROMEOS) 7 #if defined(OS_CHROMEOS)
8 #include "chromeos/dbus/dbus_thread_manager.h" 8 #include "chromeos/dbus/dbus_thread_manager.h"
9 #include "chromeos/dbus/fake_dbus_thread_manager.h" 9 #include "chromeos/dbus/fake_dbus_thread_manager.h"
10 #include "chromeos/dbus/fake_image_burner_client.h" 10 #include "chromeos/dbus/fake_image_burner_client.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 return memcmp(image_buffer.get(), device_buffer.get(), image_bytes_read) == 0; 161 return memcmp(image_buffer.get(), device_buffer.get(), image_bytes_read) == 0;
162 } 162 }
163 163
164 bool ImageWriterUnitTestBase::FillFile(const base::FilePath& file, 164 bool ImageWriterUnitTestBase::FillFile(const base::FilePath& file,
165 const int pattern, 165 const int pattern,
166 const int length) { 166 const int length) {
167 scoped_ptr<char[]> buffer(new char[length]); 167 scoped_ptr<char[]> buffer(new char[length]);
168 memset(buffer.get(), pattern, length); 168 memset(buffer.get(), pattern, length);
169 169
170 return file_util::WriteFile(file, buffer.get(), length) == length; 170 return base::WriteFile(file, buffer.get(), length) == length;
171 } 171 }
172 172
173 } // namespace image_writer 173 } // namespace image_writer
174 } // namespace extensions 174 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698