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

Side by Side Diff: ios/chrome/browser/translate/language_model_factory.h

Issue 2913573002: Updates language model on iOS. (Closed)
Patch Set: Created 3 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 2017 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 IOS_CHROME_BROWSER_TRANSLATE_LANGUAGE_MODEL_FACTORY_H
6 #define IOS_CHROME_BROWSER_TRANSLATE_LANGUAGE_MODEL_FACTORY_H
7
8 #include <memory>
9
10 #include "base/memory/singleton.h"
11 #include "components/keyed_service/core/keyed_service.h"
12 #include "components/keyed_service/ios/browser_state_keyed_service_factory.h"
13
14 namespace ios {
15 class ChromeBrowserState;
16 }
17
18 namespace translate {
19 class LanguageModel;
20 }
21
22 class LanguageModelFactory : public BrowserStateKeyedServiceFactory {
23 public:
24 static LanguageModelFactory* GetInstance();
25 static translate::LanguageModel* GetForBrowserState(
26 ios::ChromeBrowserState* browser_state);
27
28 private:
29 friend struct base::DefaultSingletonTraits<LanguageModelFactory>;
30
31 LanguageModelFactory();
32 ~LanguageModelFactory() override;
33
34 // BrowserStateKeyedServiceFactory implementation.
35 std::unique_ptr<KeyedService> BuildServiceInstanceFor(
36 web::BrowserState* context) const override;
37
38 DISALLOW_COPY_AND_ASSIGN(LanguageModelFactory);
39 };
40
41 #endif // IOS_CHROME_BROWSER_TRANSLATE_LANGUAGE_MODEL_FACTORY_H
OLDNEW
« no previous file with comments | « ios/chrome/browser/translate/chrome_ios_translate_client.mm ('k') | ios/chrome/browser/translate/language_model_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698