Index: chrome/browser/translate/component_cld_data_harness.cc |
diff --git a/chrome/browser/translate/component_cld_data_harness.cc b/chrome/browser/translate/component_cld_data_harness.cc |
index 45909ee9a5e7fe584039c507a283550c19b678f4..dc5f1bd3175da84e6d153edf36b27cfd22c662b3 100644 |
--- a/chrome/browser/translate/component_cld_data_harness.cc |
+++ b/chrome/browser/translate/component_cld_data_harness.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "component_cld_data_harness.h" |
+#include "chrome/browser/translate/component_cld_data_harness.h" |
#include "base/base_paths.h" |
#include "base/files/file_util.h" |
@@ -10,6 +10,8 @@ |
#include "base/path_service.h" |
#include "chrome/browser/component_updater/cld_component_installer.h" |
#include "chrome/common/chrome_paths.h" |
+#include "components/component_updater/component_updater_paths.h" |
+#include "components/translate/content/common/cld_data_source.h" |
#include "testing/gtest/include/gtest/gtest.h" |
namespace { |
@@ -22,10 +24,6 @@ const base::FilePath::CharType kComponentDataFileName[] = |
namespace test { |
-ComponentCldDataHarness::ComponentCldDataHarness() { |
- // Constructor does nothing in all cases. See Init() for initialization. |
-} |
- |
ComponentCldDataHarness::~ComponentCldDataHarness() { |
DVLOG(1) << "Tearing down CLD data harness"; |
// Dynamic data mode is enabled and we are using the component updater. |
@@ -38,6 +36,8 @@ ComponentCldDataHarness::~ComponentCldDataHarness() { |
void ComponentCldDataHarness::Init() { |
DVLOG(1) << "Initializing CLD data harness"; |
// Dynamic data mode is enabled and we are using the component updater. |
+ translate::CldDataSource::Set( |
+ translate::CldDataSource::GetComponentDataSource()); |
ASSERT_NO_FATAL_FAILURE(CopyComponentTree()); |
base::FilePath data_file; |
GetComponentDataFileDestination(&data_file); |
@@ -56,7 +56,8 @@ void ComponentCldDataHarness::ClearComponentDataFileState() { |
// parallel test processes. |
void ComponentCldDataHarness::GetExtractedComponentDestination( |
base::FilePath* out_path) { |
- ASSERT_TRUE(PathService::Get(chrome::DIR_COMPONENT_CLD2, out_path)); |
+ ASSERT_TRUE(PathService::Get(component_updater::DIR_COMPONENT_CLD2, |
+ out_path)); |
} |
void ComponentCldDataHarness::GetComponentDataFileDestination( |
@@ -91,9 +92,4 @@ void ComponentCldDataHarness::CopyComponentTree() { |
ASSERT_TRUE(base::PathExists(check_path)); |
} |
-scoped_ptr<CldDataHarness> CreateCldDataHarness() { |
- scoped_ptr<CldDataHarness> result(new ComponentCldDataHarness()); |
- return result.Pass(); |
-} |
- |
} // namespace test |