| 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/component_loader.h" | 5 #include "chrome/browser/extensions/component_loader.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 void ComponentLoader::AddHotwordHelperExtension() { | 356 void ComponentLoader::AddHotwordHelperExtension() { |
| 357 #if defined(ENABLE_HOTWORDING) | 357 #if defined(ENABLE_HOTWORDING) |
| 358 if (HotwordServiceFactory::IsHotwordAllowed(profile_)) { | 358 if (HotwordServiceFactory::IsHotwordAllowed(profile_)) { |
| 359 Add(IDR_HOTWORD_MANIFEST, | 359 Add(IDR_HOTWORD_MANIFEST, |
| 360 base::FilePath(FILE_PATH_LITERAL("hotword"))); | 360 base::FilePath(FILE_PATH_LITERAL("hotword"))); |
| 361 } | 361 } |
| 362 #endif | 362 #endif |
| 363 } | 363 } |
| 364 | 364 |
| 365 void ComponentLoader::AddImageLoaderExtension() { | 365 void ComponentLoader::AddImageLoaderExtension() { |
| 366 #if defined(IMAGE_LOADER_EXTENSION) | 366 #if defined(OS_CHROMEOS) |
| 367 Add(IDR_IMAGE_LOADER_MANIFEST, | 367 Add(IDR_IMAGE_LOADER_MANIFEST, |
| 368 base::FilePath(FILE_PATH_LITERAL("image_loader"))); | 368 base::FilePath(FILE_PATH_LITERAL("image_loader"))); |
| 369 #endif // defined(IMAGE_LOADER_EXTENSION) | 369 #endif // defined(OS_CHROMEOS) |
| 370 } | 370 } |
| 371 | 371 |
| 372 void ComponentLoader::AddNetworkSpeechSynthesisExtension() { | 372 void ComponentLoader::AddNetworkSpeechSynthesisExtension() { |
| 373 Add(IDR_NETWORK_SPEECH_SYNTHESIS_MANIFEST, | 373 Add(IDR_NETWORK_SPEECH_SYNTHESIS_MANIFEST, |
| 374 base::FilePath(FILE_PATH_LITERAL("network_speech_synthesis"))); | 374 base::FilePath(FILE_PATH_LITERAL("network_speech_synthesis"))); |
| 375 } | 375 } |
| 376 | 376 |
| 377 #if defined(OS_CHROMEOS) | 377 #if defined(OS_CHROMEOS) |
| 378 void ComponentLoader::AddChromeOsSpeechSynthesisExtension() { | 378 void ComponentLoader::AddChromeOsSpeechSynthesisExtension() { |
| 379 AddComponentFromDir( | 379 AddComponentFromDir( |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 manifest.release(), | 696 manifest.release(), |
| 697 root_directory, | 697 root_directory, |
| 698 false); | 698 false); |
| 699 CHECK_EQ(extension_id, actual_extension_id); | 699 CHECK_EQ(extension_id, actual_extension_id); |
| 700 if (!done_cb.is_null()) | 700 if (!done_cb.is_null()) |
| 701 done_cb.Run(); | 701 done_cb.Run(); |
| 702 } | 702 } |
| 703 #endif | 703 #endif |
| 704 | 704 |
| 705 } // namespace extensions | 705 } // namespace extensions |
| OLD | NEW |