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

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: Adding missing explicit. 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
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..0174845611b2745402d8902916d6077bbde3bbaf
--- /dev/null
+++ b/components/ntp_snippets/ntp_snippets_service.h
@@ -0,0 +1,36 @@
+// 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);
+ void Shutdown() override;
sdefresne 2015/11/18 17:59:06 style: the constructor and destructor must come be
noyau (Ping after 24h) 2015/11/19 09:08:21 Again, this is the same order as in the superclass
sdefresne 2015/11/19 11:34:43 This does not seems to be what other classes inher
sdefresne 2015/11/19 11:46:49 Sent https://codereview.chromium.org/1459843002 to
noyau (Ping after 24h) 2015/11/19 12:36:14 Done.
+ ~NTPSnippetsService() 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_

Powered by Google App Engine
This is Rietveld 408576698