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

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

Issue 12316077: Move the parsing of app.launch related keys out of Extension class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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/app_launch_manifest_parser.h"
6
7 #include "base/lazy_instance.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/extensions/app_launch_manifest_handler.h"
10 #include "chrome/common/extensions/extension_manifest_constants.h"
11 #include "chrome/common/extensions/manifest_handler.h"
12
13 namespace extensions {
14
15 AppLaunchManifestParser::AppLaunchManifestParser(Profile* profile) {
16 std::vector<std::string> app_launch_keys(AppLaunchManifestHandler::keys());
17 linked_ptr<AppLaunchManifestHandler> app_launch_handler(
18 new AppLaunchManifestHandler);
19 for (size_t i = 0; i < app_launch_keys.size(); ++i)
20 ManifestHandler::Register(app_launch_keys[i], app_launch_handler);
21 }
22
23 AppLaunchManifestParser::~AppLaunchManifestParser() {
24 }
25
26 static base::LazyInstance<ProfileKeyedAPIFactory<AppLaunchManifestParser> >
27 g_factory = LAZY_INSTANCE_INITIALIZER;
28
29 // static
30 ProfileKeyedAPIFactory<AppLaunchManifestParser>*
31 AppLaunchManifestParser::GetFactoryInstance() {
32 return &g_factory.Get();
33 }
34
35 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698