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

Unified Diff: components/ntp_snippets/ntp_snippets_service.h

Issue 1438043008: Creating the NTP snippet service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase fix: Don't trust git. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/ntp_snippets/OWNERS ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/ntp_snippets_service.h
diff --git a/components/ntp_snippets/ntp_snippets_service.h b/components/ntp_snippets/ntp_snippets_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..ce557e6c274783de2847480aaebc0d1c7a216460
--- /dev/null
+++ b/components/ntp_snippets/ntp_snippets_service.h
@@ -0,0 +1,37 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
+#define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "components/keyed_service/core/keyed_service.h"
+
+namespace ntp_snippets {
+
+// Stores and vend fresh content data for the NTP.
+class NTPSnippetsService : public KeyedService {
+ public:
+ // |application_language_code| should be a ISO 639-1 compliant string. Aka
+ // 'en' or 'en-US'. Note that this code should only specify the language, not
+ // the locale, so 'en_US' (english language with US locale) and 'en-GB_US'
+ // (British english person in the US) are not language code.
+ explicit NTPSnippetsService(const std::string& application_language_code);
+ ~NTPSnippetsService() override;
+
+ void Shutdown() override;
+
+ // TODO(crbug.com/547046): Add API.
+ private:
+ // The ISO 639-1 code of the language used by the application.
+ const std::string application_language_code_;
+
+ DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService);
+};
+
+} // namespace ntp_snippets
+
+#endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
« no previous file with comments | « components/ntp_snippets/OWNERS ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698