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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_windows_api.h

Issue 11649053: Banish boilerplate. Profile-keyed API factory for extension API classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/tabs/tabs_windows_api.h
diff --git a/chrome/browser/extensions/api/tabs/tabs_windows_api.h b/chrome/browser/extensions/api/tabs/tabs_windows_api.h
index ae24d5c8b34a4dd7e8907810a69af5b6d90cede2..cebc99232d747822542e4d9765e8b8d24422c366 100644
--- a/chrome/browser/extensions/api/tabs/tabs_windows_api.h
+++ b/chrome/browser/extensions/api/tabs/tabs_windows_api.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_WINDOWS_API_H_
#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
#include "chrome/browser/extensions/event_router.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
@@ -36,6 +37,16 @@ class TabsWindowsAPI : public ProfileKeyedService,
scoped_ptr<WindowsEventRouter> windows_event_router_;
};
+template <>
+struct ProfileKeyedAPIFactoryTraits<TabsWindowsAPI>
+ : public DefaultProfileKeyedAPIFactoryTraits {
+ static const char* name() {
+ return "TabsWindowsAPI";
+ }
+
+ static const bool kServiceIsNULLWhileTesting = true;
+};
+
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_WINDOWS_API_H_

Powered by Google App Engine
This is Rietveld 408576698