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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 // because they generate a lot of background behavior that can interfere. | 496 // because they generate a lot of background behavior that can interfere. |
497 if (!enable_background_extensions_during_testing && | 497 if (!enable_background_extensions_during_testing && |
498 (command_line->HasSwitch(switches::kTestType) || | 498 (command_line->HasSwitch(switches::kTestType) || |
499 command_line->HasSwitch( | 499 command_line->HasSwitch( |
500 switches::kDisableComponentExtensionsWithBackgroundPages))) { | 500 switches::kDisableComponentExtensionsWithBackgroundPages))) { |
501 return; | 501 return; |
502 } | 502 } |
503 | 503 |
504 #if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD) | 504 #if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD) |
505 // Since this is a v2 app it has a background page. | 505 // Since this is a v2 app it has a background page. |
506 if (!command_line->HasSwitch(chromeos::switches::kDisableGeniusApp)) { | 506 AddWithNameAndDescription(IDR_GENIUS_APP_MANIFEST, |
507 AddWithNameAndDescription(IDR_GENIUS_APP_MANIFEST, | 507 base::FilePath(FILE_PATH_LITERAL( |
508 base::FilePath(FILE_PATH_LITERAL( | 508 "/usr/share/chromeos-assets/genius_app")), |
509 "/usr/share/chromeos-assets/genius_app")), | 509 IDS_GENIUS_APP_NAME, |
510 IDS_GENIUS_APP_NAME, | 510 IDS_GENIUS_APP_DESCRIPTION); |
511 IDS_GENIUS_APP_DESCRIPTION); | |
512 } | |
513 #endif | 511 #endif |
514 | 512 |
515 if (!skip_session_components) { | 513 if (!skip_session_components) { |
516 AddVideoPlayerExtension(); | 514 AddVideoPlayerExtension(); |
517 AddFileManagerExtension(); | 515 AddFileManagerExtension(); |
518 AddGalleryExtension(); | 516 AddGalleryExtension(); |
519 | 517 |
520 AddHangoutServicesExtension(); | 518 AddHangoutServicesExtension(); |
521 AddHotwordAudioVerificationApp(); | 519 AddHotwordAudioVerificationApp(); |
522 AddHotwordHelperExtension(); | 520 AddHotwordHelperExtension(); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); | 640 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); |
643 storage::FileSystemContext* file_system_context = | 641 storage::FileSystemContext* file_system_context = |
644 content::BrowserContext::GetStoragePartitionForSite( | 642 content::BrowserContext::GetStoragePartitionForSite( |
645 off_the_record_context, site)->GetFileSystemContext(); | 643 off_the_record_context, site)->GetFileSystemContext(); |
646 file_system_context->EnableTemporaryFileSystemInIncognito(); | 644 file_system_context->EnableTemporaryFileSystemInIncognito(); |
647 } | 645 } |
648 #endif | 646 #endif |
649 } | 647 } |
650 | 648 |
651 } // namespace extensions | 649 } // namespace extensions |
OLD | NEW |