| 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/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 |
| OLD | NEW |