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

Unified Diff: components/translate/content/browser/browser_cld_data_provider.h

Issue 424053002: Add a new "Configure" mechanism to CLD browser-side data interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sorin@'s comments Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: components/translate/content/browser/browser_cld_data_provider.h
diff --git a/components/translate/content/browser/browser_cld_data_provider.h b/components/translate/content/browser/browser_cld_data_provider.h
index ce6022de6560d5de9f7461043eee2241266fb247..4e8776ae07b110d93dc02030d597d7df468a1781 100644
--- a/components/translate/content/browser/browser_cld_data_provider.h
+++ b/components/translate/content/browser/browser_cld_data_provider.h
@@ -5,6 +5,9 @@
#ifndef COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_DATA_PROVIDER_H_
#define COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_DATA_PROVIDER_H_
+#include <string>
+
+#include "base/files/file_path.h"
#include "ipc/ipc_listener.h"
namespace IPC {
@@ -59,6 +62,21 @@ class BrowserCldDataProvider : public IPC::Listener {
BrowserCldDataProvider* CreateBrowserCldDataProviderFor(
content::WebContents*);
+// For data sources that support a separate CLD data file, configures the path
+// of that data file.
+//
+// The 'component' and 'standalone' data sources need this method to be called
+// in order to locate the CLD data on disk.
+// If the data source doesn't need or doesn't support such configuration, this
+// function should do nothing. This is the case for, e.g., the static data
+// source.
+void SetCldDataFilePath(const base::FilePath& path);
+
+// Returns the path most recently set by SetCldDataFilePath. The initial value
+// prior to any such call is the empty path. If the data source doesn't support
+// a data file, returns the empty path.
+base::FilePath GetCldDataFilePath();
+
} // namespace translate
-#endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_DATAP_PROVIDER_H_
+#endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_DATA_PROVIDER_H_
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | components/translate/content/browser/data_file_browser_cld_data_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698