| 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 } | 340 } |
| 341 | 341 |
| 342 void ComponentLoader::AddHangoutServicesExtension() { | 342 void ComponentLoader::AddHangoutServicesExtension() { |
| 343 #if defined(GOOGLE_CHROME_BUILD) || defined(ENABLE_HANGOUT_SERVICES_EXTENSION) | 343 #if defined(GOOGLE_CHROME_BUILD) || defined(ENABLE_HANGOUT_SERVICES_EXTENSION) |
| 344 Add(IDR_HANGOUT_SERVICES_MANIFEST, | 344 Add(IDR_HANGOUT_SERVICES_MANIFEST, |
| 345 base::FilePath(FILE_PATH_LITERAL("hangout_services"))); | 345 base::FilePath(FILE_PATH_LITERAL("hangout_services"))); |
| 346 #endif | 346 #endif |
| 347 } | 347 } |
| 348 | 348 |
| 349 void ComponentLoader::AddHotwordAudioVerificationApp() { | 349 void ComponentLoader::AddHotwordAudioVerificationApp() { |
| 350 #if defined(ENABLE_HOTWORDING) |
| 350 if (HotwordServiceFactory::IsAlwaysOnAvailable()) { | 351 if (HotwordServiceFactory::IsAlwaysOnAvailable()) { |
| 351 Add(IDR_HOTWORD_AUDIO_VERIFICATION_MANIFEST, | 352 Add(IDR_HOTWORD_AUDIO_VERIFICATION_MANIFEST, |
| 352 base::FilePath(FILE_PATH_LITERAL("hotword_audio_verification"))); | 353 base::FilePath(FILE_PATH_LITERAL("hotword_audio_verification"))); |
| 353 } | 354 } |
| 355 #endif |
| 354 } | 356 } |
| 355 | 357 |
| 356 void ComponentLoader::AddHotwordHelperExtension() { | 358 void ComponentLoader::AddHotwordHelperExtension() { |
| 359 #if defined(ENABLE_HOTWORDING) |
| 357 if (HotwordServiceFactory::IsHotwordAllowed(profile_)) { | 360 if (HotwordServiceFactory::IsHotwordAllowed(profile_)) { |
| 358 Add(IDR_HOTWORD_MANIFEST, | 361 Add(IDR_HOTWORD_MANIFEST, |
| 359 base::FilePath(FILE_PATH_LITERAL("hotword"))); | 362 base::FilePath(FILE_PATH_LITERAL("hotword"))); |
| 360 } | 363 } |
| 364 #endif |
| 361 } | 365 } |
| 362 | 366 |
| 363 void ComponentLoader::AddImageLoaderExtension() { | 367 void ComponentLoader::AddImageLoaderExtension() { |
| 364 #if defined(IMAGE_LOADER_EXTENSION) | 368 #if defined(IMAGE_LOADER_EXTENSION) |
| 365 Add(IDR_IMAGE_LOADER_MANIFEST, | 369 Add(IDR_IMAGE_LOADER_MANIFEST, |
| 366 base::FilePath(FILE_PATH_LITERAL("image_loader"))); | 370 base::FilePath(FILE_PATH_LITERAL("image_loader"))); |
| 367 #endif // defined(IMAGE_LOADER_EXTENSION) | 371 #endif // defined(IMAGE_LOADER_EXTENSION) |
| 368 } | 372 } |
| 369 | 373 |
| 370 void ComponentLoader::AddNetworkSpeechSynthesisExtension() { | 374 void ComponentLoader::AddNetworkSpeechSynthesisExtension() { |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 manifest.release(), | 723 manifest.release(), |
| 720 root_directory, | 724 root_directory, |
| 721 false); | 725 false); |
| 722 CHECK_EQ(extension_id, actual_extension_id); | 726 CHECK_EQ(extension_id, actual_extension_id); |
| 723 if (!done_cb.is_null()) | 727 if (!done_cb.is_null()) |
| 724 done_cb.Run(); | 728 done_cb.Run(); |
| 725 } | 729 } |
| 726 #endif | 730 #endif |
| 727 | 731 |
| 728 } // namespace extensions | 732 } // namespace extensions |
| OLD | NEW |