OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/drive/test_util.h" | 5 #include "chrome/browser/chromeos/drive/test_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // Mark dirty. | 130 // Mark dirty. |
131 if (resources[i].is_dirty) { | 131 if (resources[i].is_dirty) { |
132 FileError error = FILE_ERROR_OK; | 132 FileError error = FILE_ERROR_OK; |
133 cache->MarkDirtyOnUIThread( | 133 cache->MarkDirtyOnUIThread( |
134 resources[i].resource_id, | 134 resources[i].resource_id, |
135 resources[i].md5, | 135 resources[i].md5, |
136 google_apis::test_util::CreateCopyResultCallback(&error)); | 136 google_apis::test_util::CreateCopyResultCallback(&error)); |
137 google_apis::test_util::RunBlockingPoolTask(); | 137 google_apis::test_util::RunBlockingPoolTask(); |
138 if (error != FILE_ERROR_OK) | 138 if (error != FILE_ERROR_OK) |
139 return false; | 139 return false; |
140 | |
141 cache->CommitDirtyOnUIThread( | |
142 resources[i].resource_id, | |
143 resources[i].md5, | |
144 google_apis::test_util::CreateCopyResultCallback(&error)); | |
145 google_apis::test_util::RunBlockingPoolTask(); | |
146 if (error != FILE_ERROR_OK) | |
147 return false; | |
148 } | 140 } |
149 } | 141 } |
150 return true; | 142 return true; |
151 } | 143 } |
152 | 144 |
153 } // namespace test_util | 145 } // namespace test_util |
154 } // namespace drive | 146 } // namespace drive |
OLD | NEW |