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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 } | 327 } |
328 | 328 |
329 void ComponentLoader::AddHangoutServicesExtension() { | 329 void ComponentLoader::AddHangoutServicesExtension() { |
330 #if defined(GOOGLE_CHROME_BUILD) || defined(ENABLE_HANGOUT_SERVICES_EXTENSION) | 330 #if defined(GOOGLE_CHROME_BUILD) || defined(ENABLE_HANGOUT_SERVICES_EXTENSION) |
331 Add(IDR_HANGOUT_SERVICES_MANIFEST, | 331 Add(IDR_HANGOUT_SERVICES_MANIFEST, |
332 base::FilePath(FILE_PATH_LITERAL("hangout_services"))); | 332 base::FilePath(FILE_PATH_LITERAL("hangout_services"))); |
333 #endif | 333 #endif |
334 } | 334 } |
335 | 335 |
336 void ComponentLoader::AddHotwordAudioVerificationApp() { | 336 void ComponentLoader::AddHotwordAudioVerificationApp() { |
337 if (HotwordService::IsExperimentalHotwordingEnabled() && | 337 if (HotwordServiceFactory::IsAlwaysOnAvailable()) { |
338 HotwordServiceFactory::IsAlwaysOnAvailable()) { | |
339 Add(IDR_HOTWORD_AUDIO_VERIFICATION_MANIFEST, | 338 Add(IDR_HOTWORD_AUDIO_VERIFICATION_MANIFEST, |
340 base::FilePath(FILE_PATH_LITERAL("hotword_audio_verification"))); | 339 base::FilePath(FILE_PATH_LITERAL("hotword_audio_verification"))); |
341 } | 340 } |
342 } | 341 } |
343 | 342 |
344 void ComponentLoader::AddHotwordHelperExtension() { | 343 void ComponentLoader::AddHotwordHelperExtension() { |
345 if (HotwordServiceFactory::IsHotwordAllowed(browser_context_)) { | 344 if (HotwordServiceFactory::IsHotwordAllowed(browser_context_)) { |
346 if (HotwordService::IsExperimentalHotwordingEnabled()) { | 345 Add(IDR_HOTWORD_MANIFEST, |
347 Add(IDR_HOTWORD_MANIFEST, | 346 base::FilePath(FILE_PATH_LITERAL("hotword"))); |
348 base::FilePath(FILE_PATH_LITERAL("hotword"))); | |
349 } else { | |
350 Add(IDR_HOTWORD_HELPER_MANIFEST, | |
351 base::FilePath(FILE_PATH_LITERAL("hotword_helper"))); | |
352 } | |
353 } | 347 } |
354 } | 348 } |
355 | 349 |
356 void ComponentLoader::AddImageLoaderExtension() { | 350 void ComponentLoader::AddImageLoaderExtension() { |
357 #if defined(IMAGE_LOADER_EXTENSION) | 351 #if defined(IMAGE_LOADER_EXTENSION) |
358 Add(IDR_IMAGE_LOADER_MANIFEST, | 352 Add(IDR_IMAGE_LOADER_MANIFEST, |
359 base::FilePath(FILE_PATH_LITERAL("image_loader"))); | 353 base::FilePath(FILE_PATH_LITERAL("image_loader"))); |
360 #endif // defined(IMAGE_LOADER_EXTENSION) | 354 #endif // defined(IMAGE_LOADER_EXTENSION) |
361 } | 355 } |
362 | 356 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); | 671 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); |
678 storage::FileSystemContext* file_system_context = | 672 storage::FileSystemContext* file_system_context = |
679 content::BrowserContext::GetStoragePartitionForSite( | 673 content::BrowserContext::GetStoragePartitionForSite( |
680 off_the_record_context, site)->GetFileSystemContext(); | 674 off_the_record_context, site)->GetFileSystemContext(); |
681 file_system_context->EnableTemporaryFileSystemInIncognito(); | 675 file_system_context->EnableTemporaryFileSystemInIncognito(); |
682 } | 676 } |
683 #endif | 677 #endif |
684 } | 678 } |
685 | 679 |
686 } // namespace extensions | 680 } // namespace extensions |
OLD | NEW |