Chromium Code Reviews| 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, |