blob: 1e9a9074eb0db3a12350091a1ac4b45fd79b880b (
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
|
// 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.
#include "chrome/browser/intents/cws_intents_registry.h"
#include "chrome/browser/intents/cws_intents_registry_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
// static
CWSIntentsRegistry* CWSIntentsRegistryFactory::GetForProfile(Profile* profile) {
return static_cast<CWSIntentsRegistry*>(
GetInstance()->GetServiceForProfile(profile, true));
}
CWSIntentsRegistryFactory::CWSIntentsRegistryFactory()
: ProfileKeyedServiceFactory("CWSIntentsRegistry",
ProfileDependencyManager::GetInstance()) {
}
CWSIntentsRegistryFactory::~CWSIntentsRegistryFactory() {
}
// static
CWSIntentsRegistryFactory* CWSIntentsRegistryFactory::GetInstance() {
return Singleton<CWSIntentsRegistryFactory>::get();
}
ProfileKeyedService* CWSIntentsRegistryFactory::BuildServiceInstanceFor(
Profile* profile) const {
CWSIntentsRegistry* registry = new CWSIntentsRegistry(
profile->GetRequestContext());
return registry;
}
bool CWSIntentsRegistryFactory::ServiceRedirectedInIncognito() const {
// TODO(groby): Do we have CWS access in incognito?
return false;
}
|