Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: chrome/browser/history/in_memory_url_index_unittest.cc

Issue 849323002: Componentize HistoryDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android compilation Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <algorithm> 5 #include <algorithm>
6 #include <fstream> 6 #include <fstream>
7 7
8 #include "base/auto_reset.h" 8 #include "base/auto_reset.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"
11 #include "base/files/scoped_temp_dir.h" 11 #include "base/files/scoped_temp_dir.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 17 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
18 #include "chrome/browser/chrome_notification_types.h" 18 #include "chrome/browser/chrome_notification_types.h"
19 #include "chrome/browser/history/history_backend.h" 19 #include "chrome/browser/history/history_backend.h"
20 #include "chrome/browser/history/history_database.h"
21 #include "chrome/browser/history/history_notifications.h" 20 #include "chrome/browser/history/history_notifications.h"
22 #include "chrome/browser/history/history_service.h" 21 #include "chrome/browser/history/history_service.h"
23 #include "chrome/browser/history/history_service_factory.h" 22 #include "chrome/browser/history/history_service_factory.h"
24 #include "chrome/browser/history/in_memory_url_index.h" 23 #include "chrome/browser/history/in_memory_url_index.h"
25 #include "chrome/browser/history/url_index_private_data.h" 24 #include "chrome/browser/history/url_index_private_data.h"
26 #include "chrome/common/chrome_paths.h" 25 #include "chrome/common/chrome_paths.h"
27 #include "chrome/test/base/history_index_restore_observer.h" 26 #include "chrome/test/base/history_index_restore_observer.h"
28 #include "chrome/test/base/testing_profile.h" 27 #include "chrome/test/base/testing_profile.h"
29 #include "components/bookmarks/test/bookmark_test_helpers.h" 28 #include "components/bookmarks/test/bookmark_test_helpers.h"
30 #include "components/history/core/browser/history_client.h" 29 #include "components/history/core/browser/history_client.h"
30 #include "components/history/core/browser/history_database.h"
31 #include "components/history/core/browser/in_memory_url_index_types.h" 31 #include "components/history/core/browser/in_memory_url_index_types.h"
32 #include "content/public/browser/notification_details.h" 32 #include "content/public/browser/notification_details.h"
33 #include "content/public/browser/notification_source.h" 33 #include "content/public/browser/notification_source.h"
34 #include "content/public/test/test_browser_thread_bundle.h" 34 #include "content/public/test/test_browser_thread_bundle.h"
35 #include "sql/transaction.h" 35 #include "sql/transaction.h"
36 #include "testing/gtest/include/gtest/gtest.h" 36 #include "testing/gtest/include/gtest/gtest.h"
37 37
38 using base::ASCIIToUTF16; 38 using base::ASCIIToUTF16;
39 39
40 namespace { 40 namespace {
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 full_file_path.GetComponents(&actual_parts); 1228 full_file_path.GetComponents(&actual_parts);
1229 ASSERT_EQ(expected_parts.size(), actual_parts.size()); 1229 ASSERT_EQ(expected_parts.size(), actual_parts.size());
1230 size_t count = expected_parts.size(); 1230 size_t count = expected_parts.size();
1231 for (size_t i = 0; i < count; ++i) 1231 for (size_t i = 0; i < count; ++i)
1232 EXPECT_EQ(expected_parts[i], actual_parts[i]); 1232 EXPECT_EQ(expected_parts[i], actual_parts[i]);
1233 // Must clear the history_dir_ to satisfy the dtor's DCHECK. 1233 // Must clear the history_dir_ to satisfy the dtor's DCHECK.
1234 set_history_dir(base::FilePath()); 1234 set_history_dir(base::FilePath());
1235 } 1235 }
1236 1236
1237 } // namespace history 1237 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/history_unittest.cc ('k') | chrome/browser/history/url_index_private_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698