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

Side by Side Diff: chrome/browser/extensions/csp_parser.cc

Issue 14694010: Consolidate manifest handler registration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months 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 | Annotate | Revision Log
OLDNEW
(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
OLDNEW
« no previous file with comments | « chrome/browser/extensions/csp_parser.h ('k') | chrome/browser/extensions/extension_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698