blob: 1f2c7e244e1c13f76086890b21d3a8297625b464 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_PROTECTOR_PROTECTOR_SERVICE_FACTORY_H_
#define CHROME_BROWSER_PROTECTOR_PROTECTOR_SERVICE_FACTORY_H_
#include "base/basictypes.h"
#include "base/memory/singleton.h"
#include "chrome/browser/profiles/profile_keyed_service_factory.h"
#include "chrome/browser/ui/global_error/global_error_service_factory.h"
namespace protector {
class ProtectorService;
class ProtectorServiceFactory : public ProfileKeyedServiceFactory {
public:
// Returns the ProtectorService instance for |profile|.
static ProtectorService* GetForProfile(Profile* profile);
static ProtectorServiceFactory* GetInstance();
private:
friend struct DefaultSingletonTraits<ProtectorServiceFactory>;
ProtectorServiceFactory();
virtual ~ProtectorServiceFactory();
// ProfileKeyedServiceFactory implementation.
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
virtual void RegisterUserPrefs(PrefService* user_prefs) OVERRIDE;
virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(ProtectorServiceFactory);
};
} // namespace protector
#endif // CHROME_BROWSER_PROTECTOR_PROTECTOR_SERVICE_FACTORY_H_
|