| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/stl_util.h" | 5 #include "base/stl_util.h" |
| 6 #include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h" | 6 #include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h" |
| 7 #include "chrome/browser/sync_file_system/local/local_file_change_tracker.h" | 7 #include "chrome/browser/sync_file_system/local/local_file_change_tracker.h" |
| 8 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h" | 8 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h" |
| 9 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" | 9 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" |
| 10 #include "chrome/browser/sync_file_system/syncable_file_system_util.h" | 10 #include "chrome/browser/sync_file_system/syncable_file_system_util.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 SyncableFileSystemTest() | 37 SyncableFileSystemTest() |
| 38 : in_memory_env_(leveldb::NewMemEnv(leveldb::Env::Default())), | 38 : in_memory_env_(leveldb::NewMemEnv(leveldb::Env::Default())), |
| 39 file_system_(GURL("http://example.com/"), | 39 file_system_(GURL("http://example.com/"), |
| 40 in_memory_env_.get(), | 40 in_memory_env_.get(), |
| 41 base::MessageLoopProxy::current().get(), | 41 base::MessageLoopProxy::current().get(), |
| 42 base::MessageLoopProxy::current().get()), | 42 base::MessageLoopProxy::current().get()), |
| 43 weak_factory_(this) {} | 43 weak_factory_(this) {} |
| 44 | 44 |
| 45 virtual void SetUp() { | 45 virtual void SetUp() { |
| 46 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 46 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
| 47 file_system_.SetUp(); | 47 file_system_.SetUp(CannedSyncableFileSystem::QUOTA_ENABLED); |
| 48 | 48 |
| 49 sync_context_ = | 49 sync_context_ = |
| 50 new LocalFileSyncContext(data_dir_.path(), | 50 new LocalFileSyncContext(data_dir_.path(), |
| 51 in_memory_env_.get(), | 51 in_memory_env_.get(), |
| 52 base::MessageLoopProxy::current().get(), | 52 base::MessageLoopProxy::current().get(), |
| 53 base::MessageLoopProxy::current().get()); | 53 base::MessageLoopProxy::current().get()); |
| 54 ASSERT_EQ( | 54 ASSERT_EQ( |
| 55 sync_file_system::SYNC_STATUS_OK, | 55 sync_file_system::SYNC_STATUS_OK, |
| 56 file_system_.MaybeInitializeFileSystemContext(sync_context_.get())); | 56 file_system_.MaybeInitializeFileSystemContext(sync_context_.get())); |
| 57 } | 57 } |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 // Now try copying the directory into the syncable file system, which should | 280 // Now try copying the directory into the syncable file system, which should |
| 281 // fail if directory operation is disabled. (http://crbug.com/161442) | 281 // fail if directory operation is disabled. (http://crbug.com/161442) |
| 282 EXPECT_NE(base::File::FILE_OK, | 282 EXPECT_NE(base::File::FILE_OK, |
| 283 file_system_.Copy(kSrcDir, URL("dest"))); | 283 file_system_.Copy(kSrcDir, URL("dest"))); |
| 284 | 284 |
| 285 other_file_system_.TearDown(); | 285 other_file_system_.TearDown(); |
| 286 SetEnableSyncFSDirectoryOperation(was_enabled); | 286 SetEnableSyncFSDirectoryOperation(was_enabled); |
| 287 } | 287 } |
| 288 | 288 |
| 289 } // namespace sync_file_system | 289 } // namespace sync_file_system |
| OLD | NEW |