OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "components/keyed_service/core/keyed_service.h" |
| 12 |
| 13 namespace ntp_snippets { |
| 14 |
| 15 // Stores and vend fresh content data for the NTP. |
| 16 class NTPSnippetsService : public KeyedService { |
| 17 public: |
| 18 // |application_language_code| should be a ISO 639-1 compliant string. Aka |
| 19 // 'en' or 'en-US'. Note that this code should only specify the language, not |
| 20 // the locale, so 'en_US' (english language with US locale) and 'en-GB_US' |
| 21 // (British english person in the US) are not language code. |
| 22 explicit NTPSnippetsService(const std::string& application_language_code); |
| 23 ~NTPSnippetsService() override; |
| 24 |
| 25 void Shutdown() override; |
| 26 |
| 27 // TODO(crbug.com/547046): Add API. |
| 28 private: |
| 29 // The ISO 639-1 code of the language used by the application. |
| 30 const std::string application_language_code_; |
| 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); |
| 33 }; |
| 34 |
| 35 } // namespace ntp_snippets |
| 36 |
| 37 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ |
OLD | NEW |