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

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: extension_service_unittest fixed 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/i18n/i18n_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10b4339b884d70b31de49592f6a822753d2f4338..9e291dc96d3f25a0f35dd57360f9cb280a896c26 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("i18n.getAcceptLanguages", 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698