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

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

Issue 2034413003: Delete the non-static CLD data source logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to latest master Created 4 years, 6 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 unified diff | Download patch
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 #include "components/translate/content/browser/browser_cld_utils.h"
6
7 #include "base/logging.h"
8 #include "components/translate/content/browser/browser_cld_data_provider_factory .h"
9 #include "components/translate/content/common/cld_data_source.h"
10
11 namespace translate {
12
13 // static
14 void BrowserCldUtils::ConfigureDefaultDataProvider() {
15 if (!BrowserCldDataProviderFactory::IsInitialized()) {
16 DVLOG(1) << "Configuring default BrowserCldDataProviderFactory";
17 BrowserCldDataProviderFactory* factory = NULL;
18 CldDataSource* data_source = NULL;
19
20 // Maintainers: Customize platform defaults here as necessary.
21 // It is appropriate to ifdef this code and customize per-platform.
22 //
23 // Remember to update GYP/GN dependencies of high-level targets as well:
24 // - For the NONE or STATIC data sources, depend upon
25 // third_party/cld_2/cld_2.gyp:cld2_static.
26 // - For the COMPONENT or STANDALONE data sources, depend upon
27 // third_party/cld_2/cld_2.gyp:cld2_dynamic.
28 // - For any other sources, the embedder should already have set a factory
29 // and so this code should never be invoked.
30 // -----------------------------------------------------------------------
31 factory = new BrowserCldDataProviderFactory();
32 data_source = CldDataSource::GetStaticDataSource();
33 // -----------------------------------------------------------------------
34
35 // Apply the values defined above
36 BrowserCldDataProviderFactory::SetDefault(factory);
37 CldDataSource::SetDefault(data_source);
38 }
39 }
40
41 } // namespace translate
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698