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 "chrome/browser/sync/glue/sync_backend_host_impl.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host_impl.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 fake_manager_->GetAndResetConfigureReason()); | 684 fake_manager_->GetAndResetConfigureReason()); |
685 } | 685 } |
686 | 686 |
687 // It is SyncBackendHostCore responsibility to cleanup Sync Data folder if sync | 687 // It is SyncBackendHostCore responsibility to cleanup Sync Data folder if sync |
688 // setup hasn't been completed. This test ensures that cleanup happens. | 688 // setup hasn't been completed. This test ensures that cleanup happens. |
689 TEST_F(SyncBackendHostTest, TestStartupWithOldSyncData) { | 689 TEST_F(SyncBackendHostTest, TestStartupWithOldSyncData) { |
690 const char* nonsense = "slon"; | 690 const char* nonsense = "slon"; |
691 base::FilePath temp_directory = | 691 base::FilePath temp_directory = |
692 profile_->GetPath().AppendASCII("Sync Data"); | 692 profile_->GetPath().AppendASCII("Sync Data"); |
693 base::FilePath sync_file = temp_directory.AppendASCII("SyncData.sqlite3"); | 693 base::FilePath sync_file = temp_directory.AppendASCII("SyncData.sqlite3"); |
694 ASSERT_TRUE(file_util::CreateDirectory(temp_directory)); | 694 ASSERT_TRUE(base::CreateDirectory(temp_directory)); |
695 ASSERT_NE(-1, file_util::WriteFile(sync_file, nonsense, strlen(nonsense))); | 695 ASSERT_NE(-1, file_util::WriteFile(sync_file, nonsense, strlen(nonsense))); |
696 | 696 |
697 InitializeBackend(true); | 697 InitializeBackend(true); |
698 | 698 |
699 EXPECT_FALSE(base::PathExists(sync_file)); | 699 EXPECT_FALSE(base::PathExists(sync_file)); |
700 } | 700 } |
701 | 701 |
702 } // namespace | 702 } // namespace |
703 | 703 |
704 } // namespace browser_sync | 704 } // namespace browser_sync |
OLD | NEW |