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

Unified Diff: chrome/browser/extensions/api/font_settings/font_settings_api.h

Issue 11820041: Remove profile-keyed factory boilerplates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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/font_settings/font_settings_api.h
diff --git a/chrome/browser/extensions/api/font_settings/font_settings_api.h b/chrome/browser/extensions/api/font_settings/font_settings_api.h
index 3920ca809a66c92efb5ab1bcfe5b492d93594f71..c43db4e8c6b417b430add35625926e8d43ab8358 100644
--- a/chrome/browser/extensions/api/font_settings/font_settings_api.h
+++ b/chrome/browser/extensions/api/font_settings/font_settings_api.h
@@ -12,10 +12,10 @@
#include "base/memory/scoped_ptr.h"
#include "base/prefs/public/pref_change_registrar.h"
+#include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
#include "chrome/browser/extensions/event_router.h"
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/browser/profiles/profile_keyed_service.h"
class Profile;
@@ -70,12 +70,23 @@ class FontSettingsEventRouter {
// The profile-keyed service that manages the font_settings extension API.
// This is not an EventRouter::Observer (and does not lazily initialize) because
// doing so caused a regression in perf tests. See crbug.com/163466.
-class FontSettingsAPI : public ProfileKeyedService {
+class FontSettingsAPI : public ProfileKeyedAPI {
public:
explicit FontSettingsAPI(Profile* profile);
virtual ~FontSettingsAPI();
+ // ProfileKeyedAPI implementation.
+ static ProfileKeyedAPIFactory<FontSettingsAPI>* GetFactoryInstance();
+
private:
+ friend class ProfileKeyedAPIFactory<FontSettingsAPI>;
+
+ // ProfileKeyedAPI implementation.
+ static const char* service_name() {
+ return "FontSettingsAPI";
+ }
+ static const bool kServiceIsNULLWhileTesting = true;
+
scoped_ptr<FontSettingsEventRouter> font_settings_event_router_;
};
« no previous file with comments | « chrome/browser/extensions/api/commands/commands.cc ('k') | chrome/browser/extensions/api/font_settings/font_settings_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698