| Index: components/translate/content/browser/data_file_browser_cld_data_provider.cc
|
| diff --git a/components/translate/content/browser/data_file_browser_cld_data_provider.cc b/components/translate/content/browser/data_file_browser_cld_data_provider.cc
|
| index 70648e97e3040a09be916a040b2d980b42ba06d7..8af0f1bfabc59fee9e0427ab7910715d66e5cdf5 100644
|
| --- a/components/translate/content/browser/data_file_browser_cld_data_provider.cc
|
| +++ b/components/translate/content/browser/data_file_browser_cld_data_provider.cc
|
| @@ -13,6 +13,7 @@
|
| #include "base/path_service.h"
|
| #include "base/synchronization/lock.h"
|
| #include "base/task_runner.h"
|
| +#include "components/translate/content/common/cld_data_source.h"
|
| #include "components/translate/content/common/data_file_cld_data_provider_messages.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/render_process_host.h"
|
| @@ -36,14 +37,6 @@ base::LazyInstance<base::Lock> g_file_lock_;
|
|
|
| namespace translate {
|
|
|
| -// Implementation of the static factory method from BrowserCldDataProvider,
|
| -// hooking up this specific implementation for all of Chromium.
|
| -BrowserCldDataProvider* CreateBrowserCldDataProviderFor(
|
| - content::WebContents* web_contents) {
|
| - VLOG(1) << "Creating DataFileBrowserCldDataProvider";
|
| - return new DataFileBrowserCldDataProvider(web_contents);
|
| -}
|
| -
|
| void SetCldDataFilePath(const base::FilePath& path) {
|
| VLOG(1) << "Setting CLD data file path to: " << path.value();
|
| base::AutoLock lock(g_file_lock_.Get());
|
| @@ -58,6 +51,9 @@ void SetCldDataFilePath(const base::FilePath& path) {
|
|
|
| base::FilePath GetCldDataFilePath() {
|
| base::AutoLock lock(g_file_lock_.Get());
|
| + if (g_cached_filepath == NULL) {
|
| + g_cached_filepath = translate::CldDataSource::Get()->GetCldDataFilePath();
|
| + }
|
| return g_cached_filepath;
|
| }
|
|
|
|
|