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

Side by Side Diff: components/translate/content/browser/browser_cld_utils.h

Issue 461633002: Refactor language detection logic to allow non-static CLD data sources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make some of the harness factory methods private Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_UTILS_H_
6 #define COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_UTILS_H_
7
8 #include "base/macros.h"
9
10 namespace translate {
11
12 // Browser-side utilities for dealing with CLD data source configuration.
13 // This class exists primarily to avoid duplicating code in high-level targets
14 // such as the Chrome browser, Chrome shell, and so on.
15 class BrowserCldUtils {
16 public:
17 // Perform conditional configuration of the CLD data provider.
18 // If no specific BrowserCldDataProviderFactory has yet been set, an instance
19 // is created and assigned as appropriate for each platform. If a specific
20 // BrowserCldDataProviderFactory *has* been set, this method does nothing
21 // (as a side effect of setting the default factory, subsequent invocations
22 // do nothing - making this method reentrant).
23 //
24 // This method will not overwrite a data provider configured by an embedder.
25 // This method must be invoked prior to registering components with the
26 // component updater if the component updater implementation is to be used;
27 // it is best to ensure that this method is called as early as possible.
28 static void ConfigureDefaultDataProvider();
29
30 private:
31 BrowserCldUtils() {}
32 ~BrowserCldUtils() {}
33 DISALLOW_COPY_AND_ASSIGN(BrowserCldUtils);
34 };
35
36 } // namespace translate
37
38 #endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698