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 e2eba9326d55e1da508cd6af2e581d02f8b3851d..b7c6853a551b4642df319551c751f8708392b02f 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 |
@@ -44,6 +44,16 @@ BrowserCldDataProvider* CreateBrowserCldDataProviderFor( |
return new DataFileBrowserCldDataProvider(web_contents); |
} |
+// This implementation requires the parameter to be a pointer to an object |
+// of type base::FilePath. A copy will be made and SetCldDataFilePath will |
+// be invoked. This allows configuration by the browser for both the |
+// "component" and "standalone" data sources without the need to explicitly |
+// depend upon one or the other at compile time. |
+void ConfigureBrowserCldDataProvider(const void* config) { |
+ const base::FilePath* as_path = static_cast<const base::FilePath*>(config); |
+ DataFileBrowserCldDataProvider::SetCldDataFilePath(*as_path); |
+} |
+ |
void DataFileBrowserCldDataProvider::SetCldDataFilePath( |
const base::FilePath& path) { |
VLOG(1) << "Setting CLD data file path to: " << path.value(); |