| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 217 |
| 218 scoped_ptr<google_apis::FileResource> AddDirectoryToDriveService( | 218 scoped_ptr<google_apis::FileResource> AddDirectoryToDriveService( |
| 219 drive::FakeDriveService* fake_drive_service, | 219 drive::FakeDriveService* fake_drive_service, |
| 220 const std::string& parent_resource_id, | 220 const std::string& parent_resource_id, |
| 221 const std::string& title, | 221 const std::string& title, |
| 222 const std::string& last_modified, | 222 const std::string& last_modified, |
| 223 const std::string& last_viewed_by_me) { | 223 const std::string& last_viewed_by_me) { |
| 224 google_apis::DriveApiErrorCode error = google_apis::DRIVE_OTHER_ERROR; | 224 google_apis::DriveApiErrorCode error = google_apis::DRIVE_OTHER_ERROR; |
| 225 scoped_ptr<google_apis::FileResource> entry; | 225 scoped_ptr<google_apis::FileResource> entry; |
| 226 fake_drive_service->AddNewDirectory( | 226 fake_drive_service->AddNewDirectory( |
| 227 parent_resource_id, | 227 parent_resource_id, title, drive::AddNewDirectoryOptions(), |
| 228 title, | |
| 229 drive::DriveServiceInterface::AddNewDirectoryOptions(), | |
| 230 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); | 228 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); |
| 231 base::RunLoop().RunUntilIdle(); | 229 base::RunLoop().RunUntilIdle(); |
| 232 if (error != google_apis::HTTP_CREATED) | 230 if (error != google_apis::HTTP_CREATED) |
| 233 return scoped_ptr<google_apis::FileResource>(); | 231 return scoped_ptr<google_apis::FileResource>(); |
| 234 | 232 |
| 235 return UpdateDriveEntryTime(fake_drive_service, entry->file_id(), | 233 return UpdateDriveEntryTime(fake_drive_service, entry->file_id(), |
| 236 last_modified, last_viewed_by_me); | 234 last_modified, last_viewed_by_me); |
| 237 } | 235 } |
| 238 | 236 |
| 239 // Sets up the drive service state. | 237 // Sets up the drive service state. |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 AppFileHandlerMulti) { | 852 AppFileHandlerMulti) { |
| 855 EXPECT_TRUE( | 853 EXPECT_TRUE( |
| 856 RunFileSystemExtensionApiTest("file_browser/app_file_handler_multi", | 854 RunFileSystemExtensionApiTest("file_browser/app_file_handler_multi", |
| 857 FILE_PATH_LITERAL("manifest.json"), | 855 FILE_PATH_LITERAL("manifest.json"), |
| 858 "", | 856 "", |
| 859 FLAGS_NONE)) | 857 FLAGS_NONE)) |
| 860 << message_; | 858 << message_; |
| 861 } | 859 } |
| 862 } // namespace | 860 } // namespace |
| 863 } // namespace file_manager | 861 } // namespace file_manager |
| OLD | NEW |