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

Unified Diff: chrome/browser/extensions/component_loader.cc

Issue 295123002: Provide script/gypi support for manifest generation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/resources/chromeos/chromevox/chromevox.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/component_loader.cc
diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc
index c1575a976b95e010d07f599a6308188678e1d617..07dfb76cbe2ad6522f371186af8ef39c838fd36c 100644
--- a/chrome/browser/extensions/component_loader.cc
+++ b/chrome/browser/extensions/component_loader.cc
@@ -329,15 +329,23 @@ void ComponentLoader::AddNetworkSpeechSynthesisExtension() {
#if defined(OS_CHROMEOS)
std::string ComponentLoader::AddChromeVoxExtension() {
+ base::FilePath chromevox_path;
+ PathService::Get(chrome::DIR_RESOURCES, &chromevox_path);
+ chromevox_path =
+ chromevox_path.Append(extension_misc::kChromeVoxExtensionPath);
+
const CommandLine* command_line = CommandLine::ForCurrentProcess();
- int idr = command_line->HasSwitch(chromeos::switches::kGuestSession) ?
- IDR_CHROMEVOX_GUEST_MANIFEST : IDR_CHROMEVOX_MANIFEST;
+ const char* manifest_filename =
+ command_line->HasSwitch(chromeos::switches::kGuestSession) ?
+ extension_misc::kChromeVoxGuestManifestFilename :
+ extension_misc::kChromeVoxManifestFilename;
+
+ std::string error;
+ scoped_ptr<base::DictionaryValue> manifest(
+ file_util::LoadManifest(chromevox_path, manifest_filename, &error));
+ CHECK(manifest) << error;
- // TODO(dtseng): Guest mode manifest for ChromeVox Next pending work to
- // generate manifests.
- if (command_line->HasSwitch(chromeos::switches::kEnableChromeVoxNext))
- idr = IDR_CHROMEVOX2_MANIFEST;
- return Add(idr, base::FilePath(extension_misc::kChromeVoxExtensionPath));
+ return Add(manifest.release(), chromevox_path);
}
std::string ComponentLoader::AddChromeOsSpeechSynthesisExtension() {
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/resources/chromeos/chromevox/chromevox.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698