| 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/drive_file_system.h" | 5 #include "chrome/browser/chromeos/drive/drive_file_system.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 ASSERT_TRUE(file_system_); | 180 ASSERT_TRUE(file_system_); |
| 181 file_system_.reset(); | 181 file_system_.reset(); |
| 182 fake_drive_service_.reset(); | 182 fake_drive_service_.reset(); |
| 183 cache_.reset(); | 183 cache_.reset(); |
| 184 profile_.reset(NULL); | 184 profile_.reset(NULL); |
| 185 } | 185 } |
| 186 | 186 |
| 187 // Loads test json file as root ("/drive") element. | 187 // Loads test json file as root ("/drive") element. |
| 188 bool LoadRootFeedDocument() { | 188 bool LoadRootFeedDocument() { |
| 189 DriveFileError error = DRIVE_FILE_ERROR_FAILED; | 189 DriveFileError error = DRIVE_FILE_ERROR_FAILED; |
| 190 file_system_->change_list_loader()->LoadFromServerIfNeeded( | 190 file_system_->change_list_loader()->LoadIfNeeded( |
| 191 DirectoryFetchInfo(), | 191 DirectoryFetchInfo(), |
| 192 google_apis::test_util::CreateCopyResultCallback(&error)); | 192 google_apis::test_util::CreateCopyResultCallback(&error)); |
| 193 google_apis::test_util::RunBlockingPoolTask(); | 193 google_apis::test_util::RunBlockingPoolTask(); |
| 194 return error == DRIVE_FILE_OK; | 194 return error == DRIVE_FILE_OK; |
| 195 } | 195 } |
| 196 | 196 |
| 197 bool LoadChangeFeed(const std::string& filename) { | 197 bool LoadChangeFeed(const std::string& filename) { |
| 198 if (!test_util::LoadChangeFeed(filename, | 198 if (!test_util::LoadChangeFeed(filename, |
| 199 file_system_->change_list_loader(), | 199 file_system_->change_list_loader(), |
| 200 true, // is_delta_feed | 200 true, // is_delta_feed |
| (...skipping 1928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2129 | 2129 |
| 2130 // An app for foo.exe should now be found, as the registry was loaded. | 2130 // An app for foo.exe should now be found, as the registry was loaded. |
| 2131 drive_webapps_registry_->GetWebAppsForFile( | 2131 drive_webapps_registry_->GetWebAppsForFile( |
| 2132 base::FilePath(FILE_PATH_LITERAL("foo.exe")), | 2132 base::FilePath(FILE_PATH_LITERAL("foo.exe")), |
| 2133 "" /* mime_type */, | 2133 "" /* mime_type */, |
| 2134 &apps); | 2134 &apps); |
| 2135 EXPECT_EQ(1U, apps.size()); | 2135 EXPECT_EQ(1U, apps.size()); |
| 2136 } | 2136 } |
| 2137 | 2137 |
| 2138 } // namespace drive | 2138 } // namespace drive |
| OLD | NEW |