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

Side by Side Diff: components/history/core/test/database_test_utils.cc

Issue 870063002: Componentize TopSites, TopSitesBackend, TopSitesDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@815983002
Patch Set: Fix typo Created 5 years, 10 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/history/core/test/database_test_utils.h"
6
7 #include "base/files/file_path.h"
8 #include "base/path_service.h"
9 #include "sql/test/test_helpers.h"
10
11 namespace history {
12
13 namespace {
14
15 WARN_UNUSED_RESULT bool GetTestDataHistoryDir(base::FilePath* dir) {
16 if (!PathService::Get(base::DIR_SOURCE_ROOT, dir))
17 return false;
18 *dir = dir->AppendASCII("components");
19 *dir = dir->AppendASCII("test");
20 *dir = dir->AppendASCII("data");
21 *dir = dir->AppendASCII("history");
22 return true;
23 }
24
25 } // namespace
26
27 WARN_UNUSED_RESULT bool CreateDatabaseFromSQL(const base::FilePath& db_path,
28 const char* ascii_path) {
29 base::FilePath dir;
30 if (!GetTestDataHistoryDir(&dir))
31 return false;
32 return sql::test::CreateDatabaseFromSQL(db_path, dir.AppendASCII(ascii_path));
33 }
34
35 } // namespace history
OLDNEW
« no previous file with comments | « components/history/core/test/database_test_utils.h ('k') | components/history/core/test/thumbnail-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698