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

Unified Diff: components/translate/content/common/cld_data_source.h

Issue 424123003: Replace the use of CLD_DATA_FROM* and CLD-related ifdefs with runtime checks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | components/translate/content/common/component_cld_data_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/translate/content/common/cld_data_source.h
diff --git a/components/translate/content/common/cld_data_source.h b/components/translate/content/common/cld_data_source.h
index 1ba6511561dfb276a3fca210a083a5c3cfec6414..07a56b0437a6894c0ff105608f86ff68a9126033 100644
--- a/components/translate/content/common/cld_data_source.h
+++ b/components/translate/content/common/cld_data_source.h
@@ -24,9 +24,24 @@ class CldDataSource {
// implementations.
//
// Other implementations based upon Chromium may provide CLD differently and
- // may have other names.
+ // may have other names. This method is primarily provided for those
+ // non-Chromium implementations; Chromium implementations should use the
+ // boolean methods in this class instead:
+ // ShouldRegisterForComponentUpdates()
+ // ShouldUseStandaloneDataFile()
static std::string GetName();
+ // Returns true if the data source needs to receive updates from the
+ // Component Updater.
+ // This is only true if the data source name is "component", but makes caller
+ // logic more generic.
+ static bool ShouldRegisterForComponentUpdates();
+
+ // Returns true if the data source needs to have the path to the CLD
+ // data file configured immediately because it is bundled with Chromium.
+ // This is only true if the data source name is "standalone", but makes
+ // caller logic more generic.
+ static bool ShouldUseStandaloneDataFile();
};
} // namespace translate
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | components/translate/content/common/component_cld_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698