| 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/history/history_backend.h" | 5 #include "chrome/browser/history/history_backend.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 2854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2865 base::FilePath db2_actual(history_path.AppendASCII("Underlying DB")); | 2865 base::FilePath db2_actual(history_path.AppendASCII("Underlying DB")); |
| 2866 | 2866 |
| 2867 // Setup dummy index database files. | 2867 // Setup dummy index database files. |
| 2868 const char* data = "Dummy"; | 2868 const char* data = "Dummy"; |
| 2869 const size_t data_len = 5; | 2869 const size_t data_len = 5; |
| 2870 ASSERT_TRUE(file_util::WriteFile(db1, data, data_len)); | 2870 ASSERT_TRUE(file_util::WriteFile(db1, data, data_len)); |
| 2871 ASSERT_TRUE(file_util::WriteFile(db1_journal, data, data_len)); | 2871 ASSERT_TRUE(file_util::WriteFile(db1_journal, data, data_len)); |
| 2872 ASSERT_TRUE(file_util::WriteFile(db1_wal, data, data_len)); | 2872 ASSERT_TRUE(file_util::WriteFile(db1_wal, data, data_len)); |
| 2873 ASSERT_TRUE(file_util::WriteFile(db2_actual, data, data_len)); | 2873 ASSERT_TRUE(file_util::WriteFile(db2_actual, data, data_len)); |
| 2874 #if defined(OS_POSIX) | 2874 #if defined(OS_POSIX) |
| 2875 EXPECT_TRUE(file_util::CreateSymbolicLink(db2_actual, db2_symlink)); | 2875 EXPECT_TRUE(base::CreateSymbolicLink(db2_actual, db2_symlink)); |
| 2876 #endif | 2876 #endif |
| 2877 | 2877 |
| 2878 // Delete all DTS index databases. | 2878 // Delete all DTS index databases. |
| 2879 backend_->DeleteFTSIndexDatabases(); | 2879 backend_->DeleteFTSIndexDatabases(); |
| 2880 EXPECT_FALSE(base::PathExists(db1)); | 2880 EXPECT_FALSE(base::PathExists(db1)); |
| 2881 EXPECT_FALSE(base::PathExists(db1_wal)); | 2881 EXPECT_FALSE(base::PathExists(db1_wal)); |
| 2882 EXPECT_FALSE(base::PathExists(db1_journal)); | 2882 EXPECT_FALSE(base::PathExists(db1_journal)); |
| 2883 EXPECT_FALSE(base::PathExists(db2_symlink)); | 2883 EXPECT_FALSE(base::PathExists(db2_symlink)); |
| 2884 EXPECT_TRUE(base::PathExists(db2_actual)); // Symlinks shouldn't be followed. | 2884 EXPECT_TRUE(base::PathExists(db2_actual)); // Symlinks shouldn't be followed. |
| 2885 } | 2885 } |
| 2886 | 2886 |
| 2887 } // namespace history | 2887 } // namespace history |
| OLD | NEW |