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

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

Issue 2212853002: Move ChromeVox loading out of ComponentLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/extensions/component_loader.h ('k') | no next file » | 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 c6289573007995aa59ce773c6df3a42f610372fa..ee768038fece0570c139d99f07b9cd6fe77ddc5c 100644
--- a/chrome/browser/extensions/component_loader.cc
+++ b/chrome/browser/extensions/component_loader.cc
@@ -56,7 +56,6 @@
#endif
#if defined(OS_CHROMEOS)
-#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
#include "chromeos/chromeos_switches.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/storage_partition.h"
@@ -101,13 +100,6 @@ std::unique_ptr<base::DictionaryValue> LoadManifestOnFileThread(
CHECK(localized) << error;
return manifest;
}
-
-bool IsNormalSession() {
- return !base::CommandLine::ForCurrentProcess()->HasSwitch(
- chromeos::switches::kGuestSession) &&
- user_manager::UserManager::IsInitialized() &&
- user_manager::UserManager::Get()->IsUserLoggedIn();
-}
#endif // defined(OS_CHROMEOS)
} // namespace
@@ -377,24 +369,6 @@ void ComponentLoader::AddNetworkSpeechSynthesisExtension() {
}
#if defined(OS_CHROMEOS)
-void ComponentLoader::AddChromeVoxExtension(
- const base::Closure& done_cb) {
- base::FilePath resources_path;
- CHECK(PathService::Get(chrome::DIR_RESOURCES, &resources_path));
-
- base::FilePath chromevox_path =
- resources_path.Append(extension_misc::kChromeVoxExtensionPath);
-
- const base::FilePath::CharType* manifest_filename =
- IsNormalSession() ? extensions::kManifestFilename
- : extension_misc::kGuestManifestFilename;
- AddWithManifestFile(
- manifest_filename,
- chromevox_path,
- extension_misc::kChromeVoxExtensionId,
- done_cb);
-}
-
void ComponentLoader::AddChromeOsSpeechSynthesisExtension() {
const base::FilePath::CharType* manifest_filename =
IsNormalSession() ? extensions::kManifestFilename
@@ -625,12 +599,6 @@ void ComponentLoader::AddDefaultComponentExtensionsWithBackgroundPages(
Add(IDR_ARC_SUPPORT_MANIFEST,
base::FilePath(FILE_PATH_LITERAL("chromeos/arc_support")));
}
-
- // Load ChromeVox extension now if spoken feedback is enabled.
- if (chromeos::AccessibilityManager::Get() &&
- chromeos::AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) {
- AddChromeVoxExtension(base::Closure());
- }
#endif // defined(OS_CHROMEOS)
#if defined(GOOGLE_CHROME_BUILD)
@@ -689,6 +657,14 @@ void ComponentLoader::EnableFileSystemInGuestMode(const std::string& id) {
}
#if defined(OS_CHROMEOS)
+// static
+bool ComponentLoader::IsNormalSession() {
Devlin 2016/08/04 16:18:33 Rather than exposing this logic to the a11y manage
dmazzoni 2016/08/04 17:54:38 Sounds good. How about calling it something like
+ return !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ chromeos::switches::kGuestSession) &&
+ user_manager::UserManager::IsInitialized() &&
+ user_manager::UserManager::Get()->IsUserLoggedIn();
+}
+
void ComponentLoader::AddWithManifestFile(
const base::FilePath::CharType* manifest_filename,
const base::FilePath& root_directory,
« no previous file with comments | « chrome/browser/extensions/component_loader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698