| OLD | NEW |
| 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/manifest_url_parser.h" | 5 #include "chrome/browser/extensions/manifest_url_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/devtools_page_handler.h" | 9 #include "chrome/common/extensions/devtools_page_handler.h" |
| 10 #include "chrome/common/extensions/extension_manifest_constants.h" | 10 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 11 #include "chrome/common/extensions/homepage_url_handler.h" | 11 #include "chrome/common/extensions/homepage_url_handler.h" |
| 12 #include "chrome/common/extensions/manifest_handler.h" | 12 #include "chrome/common/extensions/manifest_handler.h" |
| 13 #include "chrome/common/extensions/options_page_handler.h" |
| 14 #include "chrome/common/extensions/update_url_handler.h" |
| 13 | 15 |
| 14 namespace extensions { | 16 namespace extensions { |
| 15 | 17 |
| 16 ManifestURLParser::ManifestURLParser(Profile* profile) { | 18 ManifestURLParser::ManifestURLParser(Profile* profile) { |
| 17 ManifestHandler::Register(extension_manifest_keys::kDevToolsPage, | 19 ManifestHandler::Register(extension_manifest_keys::kDevToolsPage, |
| 18 new DevToolsPageHandler); | 20 new DevToolsPageHandler); |
| 19 ManifestHandler::Register(extension_manifest_keys::kHomepageURL, | 21 ManifestHandler::Register(extension_manifest_keys::kHomepageURL, |
| 20 new HomepageURLHandler); | 22 new HomepageURLHandler); |
| 23 ManifestHandler::Register(extension_manifest_keys::kUpdateURL, |
| 24 new UpdateURLHandler); |
| 25 ManifestHandler::Register(extension_manifest_keys::kOptionsPage, |
| 26 new OptionsPageHandler); |
| 21 } | 27 } |
| 22 | 28 |
| 23 ManifestURLParser::~ManifestURLParser() { | 29 ManifestURLParser::~ManifestURLParser() { |
| 24 } | 30 } |
| 25 | 31 |
| 26 static base::LazyInstance<ProfileKeyedAPIFactory<ManifestURLParser> > | 32 static base::LazyInstance<ProfileKeyedAPIFactory<ManifestURLParser> > |
| 27 g_factory = LAZY_INSTANCE_INITIALIZER; | 33 g_factory = LAZY_INSTANCE_INITIALIZER; |
| 28 | 34 |
| 29 template <> | 35 template <> |
| 30 ProfileKeyedAPIFactory<ManifestURLParser>* | 36 ProfileKeyedAPIFactory<ManifestURLParser>* |
| 31 ProfileKeyedAPIFactory<ManifestURLParser>::GetInstance() { | 37 ProfileKeyedAPIFactory<ManifestURLParser>::GetInstance() { |
| 32 return &g_factory.Get(); | 38 return &g_factory.Get(); |
| 33 } | 39 } |
| 34 | 40 |
| 35 } // namespace extensions | 41 } // namespace extensions |
| OLD | NEW |