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

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

Issue 12091115: Allow manifest handlers to declare keys they depend on that must be parsed before them. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dcronin Created 7 years, 10 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/web_intents_parser.h" 5 #include "chrome/browser/extensions/web_intents_parser.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/extensions/extension_manifest_constants.h" 9 #include "chrome/common/extensions/extension_manifest_constants.h"
10 #include "chrome/common/extensions/manifest_handler.h" 10 #include "chrome/common/extensions/manifest_handler.h"
11 #include "chrome/common/extensions/web_intents_handler.h" 11 #include "chrome/common/extensions/web_intents_handler.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 WebIntentsParser::WebIntentsParser(Profile* profile) { 15 WebIntentsParser::WebIntentsParser(Profile* profile) {
16 ManifestHandler::Register(extension_manifest_keys::kIntents, 16 ManifestHandler::Register(extension_manifest_keys::kIntents,
17 new WebIntentsHandler); 17 make_linked_ptr(new WebIntentsHandler));
18 } 18 }
19 19
20 WebIntentsParser::~WebIntentsParser() { 20 WebIntentsParser::~WebIntentsParser() {
21 } 21 }
22 22
23 static base::LazyInstance<ProfileKeyedAPIFactory<WebIntentsParser> > 23 static base::LazyInstance<ProfileKeyedAPIFactory<WebIntentsParser> >
24 g_factory = LAZY_INSTANCE_INITIALIZER; 24 g_factory = LAZY_INSTANCE_INITIALIZER;
25 25
26 // static 26 // static
27 ProfileKeyedAPIFactory<WebIntentsParser>* 27 ProfileKeyedAPIFactory<WebIntentsParser>*
28 WebIntentsParser::GetFactoryInstance() { 28 WebIntentsParser::GetFactoryInstance() {
29 return &g_factory.Get(); 29 return &g_factory.Get();
30 } 30 }
31 31
32 } // namespace extensions 32 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/web_accessible_resources_parser.cc ('k') | chrome/browser/intents/web_intents_registry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698