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

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

Issue 584313003: Enable runtime switching between ChromeVox and ChromeVox next via command line. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: chrome/browser/extensions/component_loader.cc
diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc
index acdad9be28fbd8ef4e51104197b42c8abaae01a8..d7bb6f7c49e40449ddc62349b291b0b7f384a16d 100644
--- a/chrome/browser/extensions/component_loader.cc
+++ b/chrome/browser/extensions/component_loader.cc
@@ -340,14 +340,24 @@ void ComponentLoader::AddChromeVoxExtension(
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
base::FilePath resources_path;
PathService::Get(chrome::DIR_RESOURCES, &resources_path);
+
base::FilePath chromevox_path =
resources_path.Append(extension_misc::kChromeVoxExtensionPath);
- const CommandLine* command_line = CommandLine::ForCurrentProcess();
- const char* manifest_filename =
- command_line->HasSwitch(chromeos::switches::kGuestSession) ?
- extension_misc::kChromeVoxGuestManifestFilename :
- extension_misc::kChromeVoxManifestFilename;
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
Peter Lundblad 2014/09/22 09:00:46 Why was the const qualifier removed here? Note th
David Tseng 2014/09/22 17:23:11 Done; inadvertently removed.
+ bool is_chromevox_next =
+ command_line->HasSwitch(chromeos::switches::kEnableChromeVoxNext);
+ bool is_guest = command_line->HasSwitch(chromeos::switches::kGuestSession);
+ const char* manifest_filename;
+ if (is_chromevox_next) {
+ manifest_filename =
+ is_guest ? extension_misc::kChromeVoxNextGuestManifestFilename
+ : extension_misc::kChromeVoxNextManifestFilename;
+ } else {
+ manifest_filename = is_guest
dmazzoni 2014/09/22 06:36:28 nit: could you indent this the same as the "if" bl
David Tseng 2014/09/22 17:23:11 Done.
+ ? extension_misc::kChromeVoxGuestManifestFilename
+ : extension_misc::kChromeVoxManifestFilename;
+ }
BrowserThread::PostTaskAndReplyWithResult(
BrowserThread::FILE,
FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698