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

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

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.cc
diff --git a/chrome/browser/extensions/api/font_settings/font_settings_api.cc b/chrome/browser/extensions/api/font_settings/font_settings_api.cc
index 7aeec6f60f3cb0afb7bf1931afe64382b64d2dec..15f11bee288ed64c4dea2bc233d346e75ddc8d85 100644
--- a/chrome/browser/extensions/api/font_settings/font_settings_api.cc
+++ b/chrome/browser/extensions/api/font_settings/font_settings_api.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/json/json_writer.h"
+#include "base/lazy_instance.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/values.h"
@@ -217,6 +218,14 @@ FontSettingsAPI::FontSettingsAPI(Profile* profile)
FontSettingsAPI::~FontSettingsAPI() {
}
+static base::LazyInstance<ProfileKeyedAPIFactory<FontSettingsAPI> >
+g_factory = LAZY_INSTANCE_INITIALIZER;
+
+// static
+ProfileKeyedAPIFactory<FontSettingsAPI>* FontSettingsAPI::GetFactoryInstance() {
+ return &g_factory.Get();
+}
+
bool FontSettingsClearFontFunction::RunImpl() {
if (profile_->IsOffTheRecord()) {
error_ = kSetFromIncognitoError;

Powered by Google App Engine
This is Rietveld 408576698