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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 google_apis::test_util::CreateCopyResultCallback(&error)); | 151 google_apis::test_util::CreateCopyResultCallback(&error)); |
152 test_util::RunBlockingPoolTask(); | 152 test_util::RunBlockingPoolTask(); |
153 if (error != FILE_ERROR_OK) | 153 if (error != FILE_ERROR_OK) |
154 return false; | 154 return false; |
155 } | 155 } |
156 // Mark dirty. | 156 // Mark dirty. |
157 if (resources[i].is_dirty) { | 157 if (resources[i].is_dirty) { |
158 FileError error = FILE_ERROR_OK; | 158 FileError error = FILE_ERROR_OK; |
159 cache->MarkDirtyOnUIThread( | 159 cache->MarkDirtyOnUIThread( |
160 resources[i].resource_id, | 160 resources[i].resource_id, |
161 resources[i].md5, | |
162 google_apis::test_util::CreateCopyResultCallback(&error)); | 161 google_apis::test_util::CreateCopyResultCallback(&error)); |
163 test_util::RunBlockingPoolTask(); | 162 test_util::RunBlockingPoolTask(); |
164 if (error != FILE_ERROR_OK) | 163 if (error != FILE_ERROR_OK) |
165 return false; | 164 return false; |
166 } | 165 } |
167 } | 166 } |
168 return true; | 167 return true; |
169 } | 168 } |
170 | 169 |
171 void RegisterDrivePrefs(PrefRegistrySimple* pref_registry) { | 170 void RegisterDrivePrefs(PrefRegistrySimple* pref_registry) { |
(...skipping 17 matching lines...) Expand all Loading... |
189 NotifyObserversOfConnectionTypeChange(); | 188 NotifyObserversOfConnectionTypeChange(); |
190 } | 189 } |
191 | 190 |
192 net::NetworkChangeNotifier::ConnectionType | 191 net::NetworkChangeNotifier::ConnectionType |
193 FakeNetworkChangeNotifier::GetCurrentConnectionType() const { | 192 FakeNetworkChangeNotifier::GetCurrentConnectionType() const { |
194 return type_; | 193 return type_; |
195 } | 194 } |
196 | 195 |
197 } // namespace test_util | 196 } // namespace test_util |
198 } // namespace drive | 197 } // namespace drive |
OLD | NEW |