Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 "components/translate/content/browser/browser_cld_data_provider_factory .h" | |
| 8 #include "components/translate/content/browser/static_browser_cld_data_provider_ factory.h" | |
| 9 #include "components/translate/content/common/cld_data_source.h" | |
| 10 | |
| 11 namespace translate { | |
| 12 | |
| 13 /* static */ void BrowserCldUtils::ConfigureDefaultDataProvider() { | |
|
Takashi Toyoshima
2014/10/15 08:45:07
// static
void BrowserCldUtils::...
Andrew Hayden (chromium.org)
2014/10/30 16:56:32
Done.
| |
| 14 if (!BrowserCldDataProviderFactory::IsInitialized()) { | |
| 15 BrowserCldDataProviderFactory* factory = NULL; | |
| 16 CldDataSource* data_source = NULL; | |
| 17 | |
| 18 // Maintainers: Customize platform defaults here as necessary. | |
| 19 // Remember to update GYP/GN dependencies of high-level targets as well: | |
| 20 // - For the NONE or STATIC data sources, depend upon | |
| 21 // third_party/cld_2/cld_2.gyp:cld2_static. | |
| 22 // - For the COMPONENT or STANDALONE data sources, depend upon | |
| 23 // third_party/cld_2/cld_2.gyp:cld2_dynamic. | |
| 24 // - For any other sources, the embedder should already have set a factory | |
| 25 // and so this code should never be invoked. | |
| 26 // ----------------------------------------------------------------------- | |
| 27 factory = new StaticBrowserCldDataProviderFactory(); | |
| 28 data_source = CldDataSource::STATIC(); | |
| 29 // ----------------------------------------------------------------------- | |
| 30 | |
| 31 // Apply the values defined above | |
| 32 BrowserCldDataProviderFactory::Set(factory, false); | |
| 33 CldDataSource::Set(data_source, false); | |
| 34 } | |
| 35 } | |
| 36 | |
| 37 } // namespace translate | |
| OLD | NEW |