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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 } | 690 } |
691 | 691 |
692 // It is SyncBackendHostCore responsibility to cleanup Sync Data folder if sync | 692 // It is SyncBackendHostCore responsibility to cleanup Sync Data folder if sync |
693 // setup hasn't been completed. This test ensures that cleanup happens. | 693 // setup hasn't been completed. This test ensures that cleanup happens. |
694 TEST_F(SyncBackendHostTest, TestStartupWithOldSyncData) { | 694 TEST_F(SyncBackendHostTest, TestStartupWithOldSyncData) { |
695 const char* nonsense = "slon"; | 695 const char* nonsense = "slon"; |
696 base::FilePath temp_directory = | 696 base::FilePath temp_directory = |
697 profile_->GetPath().AppendASCII("Sync Data"); | 697 profile_->GetPath().AppendASCII("Sync Data"); |
698 base::FilePath sync_file = temp_directory.AppendASCII("SyncData.sqlite3"); | 698 base::FilePath sync_file = temp_directory.AppendASCII("SyncData.sqlite3"); |
699 ASSERT_TRUE(base::CreateDirectory(temp_directory)); | 699 ASSERT_TRUE(base::CreateDirectory(temp_directory)); |
700 ASSERT_NE(-1, file_util::WriteFile(sync_file, nonsense, strlen(nonsense))); | 700 ASSERT_NE(-1, base::WriteFile(sync_file, nonsense, strlen(nonsense))); |
701 | 701 |
702 InitializeBackend(true); | 702 InitializeBackend(true); |
703 | 703 |
704 EXPECT_FALSE(base::PathExists(sync_file)); | 704 EXPECT_FALSE(base::PathExists(sync_file)); |
705 } | 705 } |
706 | 706 |
707 } // namespace | 707 } // namespace |
708 | 708 |
709 } // namespace browser_sync | 709 } // namespace browser_sync |
OLD | NEW |