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

Unified Diff: chrome/browser/extensions/api/i18n/i18n_api.h

Issue 12025010: Move default_locale out of Extension class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/i18n/i18n_api.h
diff --git a/chrome/browser/extensions/api/i18n/i18n_api.h b/chrome/browser/extensions/api/i18n/i18n_api.h
index 1975f17157d9ce7fb304496dc06b06f8ec7e8cd1..39043a649e709b012ee786684b180453fa442e28 100644
--- a/chrome/browser/extensions/api/i18n/i18n_api.h
+++ b/chrome/browser/extensions/api/i18n/i18n_api.h
@@ -5,12 +5,39 @@
#ifndef CHROME_BROWSER_EXTENSIONS_API_I18N_I18N_API_H_
#define CHROME_BROWSER_EXTENSIONS_API_I18N_I18N_API_H_
+#include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
#include "chrome/browser/extensions/extension_function.h"
+class Profile;
+
+namespace extensions {
+
class I18nGetAcceptLanguagesFunction : public SyncExtensionFunction {
virtual ~I18nGetAcceptLanguagesFunction() {}
virtual bool RunImpl() OVERRIDE;
DECLARE_EXTENSION_FUNCTION_NAME("i18n.getAcceptLanguages")
};
+class I18nAPI : public ProfileKeyedAPI {
+ public:
+ explicit I18nAPI(Profile* profile);
+ virtual ~I18nAPI();
+
+ // ProfileKeyedAPI implementation.
+ static ProfileKeyedAPIFactory<I18nAPI>* GetFactoryInstance();
+
+ private:
+ friend class ProfileKeyedAPIFactory<I18nAPI>;
+
+ // ProfileKeyedAPI implementation.
+ static const char* service_name() {
+ return "I18nAPI";
+ }
+ static const bool kServiceIsNULLWhileTesting = true;
+
+ DISALLOW_COPY_AND_ASSIGN(I18nAPI);
+};
+
+} // namespace extensions
+
#endif // CHROME_BROWSER_EXTENSIONS_API_I18N_I18N_API_H_
« no previous file with comments | « no previous file | chrome/browser/extensions/api/i18n/i18n_api.cc » ('j') | chrome/browser/extensions/api/i18n/i18n_api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698