OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "sync/test/directory_backing_store_corruption_testing.h" | 5 #include "components/sync/test/directory_backing_store_corruption_testing.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/files/scoped_file.h" | 10 #include "base/files/scoped_file.h" |
11 | 11 |
12 namespace syncer { | 12 namespace syncer { |
13 namespace syncable { | 13 namespace syncable { |
14 namespace corruption_testing { | 14 namespace corruption_testing { |
15 | 15 |
(...skipping 14 matching lines...) Expand all Loading... |
30 if (!db_file.get()) | 30 if (!db_file.get()) |
31 return false; | 31 return false; |
32 const std::string zeros(4096, '\0'); | 32 const std::string zeros(4096, '\0'); |
33 const int num_written = fwrite(zeros.data(), zeros.size(), 1, db_file.get()); | 33 const int num_written = fwrite(zeros.data(), zeros.size(), 1, db_file.get()); |
34 return num_written == 1U; | 34 return num_written == 1U; |
35 } | 35 } |
36 | 36 |
37 } // namespace corruption_testing | 37 } // namespace corruption_testing |
38 } // namespace syncable | 38 } // namespace syncable |
39 } // namespace syncer | 39 } // namespace syncer |
OLD | NEW |