OLD | NEW |
| (Empty) |
1 // Copyright (c) 2013 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/csp_parser.h" | |
6 | |
7 #include "base/lazy_instance.h" | |
8 #include "chrome/browser/profiles/profile.h" | |
9 #include "chrome/common/extensions/csp_handler.h" | |
10 #include "chrome/common/extensions/manifest_handlers/sandboxed_page_info.h" | |
11 | |
12 namespace extensions { | |
13 | |
14 CSPParser::CSPParser(Profile* profile) { | |
15 (new CSPHandler(false))->Register(); // not platform app. | |
16 (new CSPHandler(true))->Register(); // platform app. | |
17 (new SandboxedPageHandler)->Register(); | |
18 } | |
19 | |
20 CSPParser::~CSPParser() { | |
21 } | |
22 | |
23 static base::LazyInstance<ProfileKeyedAPIFactory<CSPParser> > | |
24 g_factory = LAZY_INSTANCE_INITIALIZER; | |
25 | |
26 // static | |
27 ProfileKeyedAPIFactory<CSPParser>* CSPParser::GetFactoryInstance() { | |
28 return &g_factory.Get(); | |
29 } | |
30 | |
31 } // namespace extensions | |
OLD | NEW |