OLD | NEW |
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 Loading... |
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 |
OLD | NEW |