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

Side by Side Diff: chrome/browser/extensions/api/extension_action/script_badge_api_factory.cc

Issue 11588004: Move ScriptBadge, ActionInfo out of Extension; preparation for BrowserAction (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Yoyo's requested changes 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/extensions/api/extension_action/script_badge_api_factor y.h"
6
7 #include "chrome/browser/extensions/api/extension_action/script_badge_api.h"
8 #include "chrome/browser/profiles/profile_dependency_manager.h"
9
10 namespace extensions {
11
12 // static
13 ScriptBadgeAPI* ScriptBadgeAPIFactory::GetForProfile(Profile* profile) {
14 return static_cast<ScriptBadgeAPI*>(
15 GetInstance()->GetServiceForProfile(profile, true));
16 }
17
18 // static
19 ScriptBadgeAPIFactory* ScriptBadgeAPIFactory::GetInstance() {
20 return Singleton<ScriptBadgeAPIFactory>::get();
21 }
22
23 ScriptBadgeAPIFactory::ScriptBadgeAPIFactory()
24 : ProfileKeyedServiceFactory("ScriptBadgeAPI",
25 ProfileDependencyManager::GetInstance()) {
26 }
27
28 ScriptBadgeAPIFactory::~ScriptBadgeAPIFactory() {
29 }
30
31 ProfileKeyedService* ScriptBadgeAPIFactory::BuildServiceInstanceFor(
32 Profile* profile) const {
33 return new ScriptBadgeAPI(profile);
34 }
35
36 bool ScriptBadgeAPIFactory::ServiceIsCreatedWithProfile() const {
37 return true;
38 }
39
40 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698