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/sync_file_system/drive_file_sync_service.h" | 5 #include "chrome/browser/sync_file_system/drive_file_sync_service.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 RemoveResourceFromDirectory(kRootResourceId, _, _)) | 275 RemoveResourceFromDirectory(kRootResourceId, _, _)) |
276 .Times(AnyNumber()); | 276 .Times(AnyNumber()); |
277 | 277 |
278 api_util_ = drive::APIUtil::CreateForTesting( | 278 api_util_ = drive::APIUtil::CreateForTesting( |
279 profile_.get(), | 279 profile_.get(), |
280 GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction), | 280 GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction), |
281 scoped_ptr<DriveServiceInterface>(mock_drive_service_), | 281 scoped_ptr<DriveServiceInterface>(mock_drive_service_), |
282 scoped_ptr<DriveUploaderInterface>()).Pass(); | 282 scoped_ptr<DriveUploaderInterface>()).Pass(); |
283 ASSERT_TRUE(base_dir_.CreateUniqueTempDir()); | 283 ASSERT_TRUE(base_dir_.CreateUniqueTempDir()); |
284 metadata_store_.reset(new DriveMetadataStore( | 284 metadata_store_.reset(new DriveMetadataStore( |
285 base_dir_.path(), base::MessageLoopProxy::current())); | 285 base_dir_.path(), base::MessageLoopProxy::current().get())); |
286 | 286 |
287 bool done = false; | 287 bool done = false; |
288 metadata_store_->Initialize(base::Bind(&DidInitialize, &done)); | 288 metadata_store_->Initialize(base::Bind(&DidInitialize, &done)); |
289 message_loop_.RunUntilIdle(); | 289 message_loop_.RunUntilIdle(); |
290 EXPECT_TRUE(done); | 290 EXPECT_TRUE(done); |
291 } | 291 } |
292 | 292 |
293 void SetUpDriveSyncService(bool enabled) { | 293 void SetUpDriveSyncService(bool enabled) { |
294 sync_service_ = DriveFileSyncService::CreateForTesting( | 294 sync_service_ = DriveFileSyncService::CreateForTesting( |
295 profile_.get(), | 295 profile_.get(), |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1030 entry->set_kind(google_apis::ENTRY_KIND_FOLDER); | 1030 entry->set_kind(google_apis::ENTRY_KIND_FOLDER); |
1031 | 1031 |
1032 // Expect to drop this change for file. | 1032 // Expect to drop this change for file. |
1033 EXPECT_FALSE(AppendIncrementalRemoteChangeByEntry( | 1033 EXPECT_FALSE(AppendIncrementalRemoteChangeByEntry( |
1034 kOrigin, *entry, 1)); | 1034 kOrigin, *entry, 1)); |
1035 } | 1035 } |
1036 | 1036 |
1037 #endif // !defined(OS_ANDROID) | 1037 #endif // !defined(OS_ANDROID) |
1038 | 1038 |
1039 } // namespace sync_file_system | 1039 } // namespace sync_file_system |
OLD | NEW |