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 3da8b5fdb58498fe8439902df4e4bef557f11590..75965148c229f0d9ed7777dd3d92981d4812e499 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 { |
@@ -38,6 +40,7 @@ ComponentCldDataHarness::~ComponentCldDataHarness() { |
void ComponentCldDataHarness::Init() { |
VLOG(1) << "Initializing CLD data harness"; |
// Dynamic data mode is enabled and we are using the component updater. |
+ translate::CldDataSource::Set(translate::CldDataSource::COMPONENT(), true); |
ASSERT_NO_FATAL_FAILURE(CopyComponentTree()); |
base::FilePath data_file; |
GetComponentDataFileDestination(&data_file); |
@@ -56,7 +59,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 +95,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 |