| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 // An OnDiskDirectoryBackingStore that can be set to always fail SaveChanges. | 47 // An OnDiskDirectoryBackingStore that can be set to always fail SaveChanges. |
| 48 class TestBackingStore : public OnDiskDirectoryBackingStore { | 48 class TestBackingStore : public OnDiskDirectoryBackingStore { |
| 49 public: | 49 public: |
| 50 TestBackingStore(const std::string& dir_name, | 50 TestBackingStore(const std::string& dir_name, |
| 51 const base::FilePath& backing_filepath); | 51 const base::FilePath& backing_filepath); |
| 52 | 52 |
| 53 virtual ~TestBackingStore(); | 53 virtual ~TestBackingStore(); |
| 54 | 54 |
| 55 virtual bool SaveChanges(const Directory::SaveChangesSnapshot& snapshot) | 55 virtual bool SaveChanges(const Directory::SaveChangesSnapshot& snapshot) |
| 56 OVERRIDE; | 56 override; |
| 57 | 57 |
| 58 void StartFailingSaveChanges() { | 58 void StartFailingSaveChanges() { |
| 59 fail_save_changes_ = true; | 59 fail_save_changes_ = true; |
| 60 } | 60 } |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 bool fail_save_changes_; | 63 bool fail_save_changes_; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 TestBackingStore::TestBackingStore(const std::string& dir_name, | 66 TestBackingStore::TestBackingStore(const std::string& dir_name, |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 TEST_F(SyncableClientTagTest, TestClientTagIndexDuplicateServer) { | 668 TEST_F(SyncableClientTagTest, TestClientTagIndexDuplicateServer) { |
| 669 EXPECT_TRUE(CreateWithDefaultTag(factory_.NewServerId(), true)); | 669 EXPECT_TRUE(CreateWithDefaultTag(factory_.NewServerId(), true)); |
| 670 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), true)); | 670 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), true)); |
| 671 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), false)); | 671 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), false)); |
| 672 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), false)); | 672 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), false)); |
| 673 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), true)); | 673 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), true)); |
| 674 } | 674 } |
| 675 | 675 |
| 676 } // namespace syncable | 676 } // namespace syncable |
| 677 } // namespace syncer | 677 } // namespace syncer |
| OLD | NEW |