| 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/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 | 297 |
| 298 void ComponentLoader::AddHangoutServicesExtension() { | 298 void ComponentLoader::AddHangoutServicesExtension() { |
| 299 #if defined(GOOGLE_CHROME_BUILD) || defined(ENABLE_HANGOUT_SERVICES_EXTENSION) | 299 #if defined(GOOGLE_CHROME_BUILD) || defined(ENABLE_HANGOUT_SERVICES_EXTENSION) |
| 300 Add(IDR_HANGOUT_SERVICES_MANIFEST, | 300 Add(IDR_HANGOUT_SERVICES_MANIFEST, |
| 301 base::FilePath(FILE_PATH_LITERAL("hangout_services"))); | 301 base::FilePath(FILE_PATH_LITERAL("hangout_services"))); |
| 302 #endif | 302 #endif |
| 303 } | 303 } |
| 304 | 304 |
| 305 void ComponentLoader::AddHotwordHelperExtension() { | 305 void ComponentLoader::AddHotwordHelperExtension() { |
| 306 if (HotwordServiceFactory::IsHotwordAllowed(browser_context_)) { | 306 if (HotwordServiceFactory::IsHotwordAllowed(browser_context_)) { |
| 307 Add(IDR_HOTWORD_HELPER_MANIFEST, | 307 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 308 base::FilePath(FILE_PATH_LITERAL("hotword_helper"))); | 308 if (command_line->HasSwitch(switches::kEnableExperimentalHotwording)) { |
| 309 Add(IDR_HOTWORD_MANIFEST, |
| 310 base::FilePath(FILE_PATH_LITERAL("hotword"))); |
| 311 } else { |
| 312 Add(IDR_HOTWORD_HELPER_MANIFEST, |
| 313 base::FilePath(FILE_PATH_LITERAL("hotword_helper"))); |
| 314 } |
| 309 } | 315 } |
| 310 } | 316 } |
| 311 | 317 |
| 312 void ComponentLoader::AddImageLoaderExtension() { | 318 void ComponentLoader::AddImageLoaderExtension() { |
| 313 #if defined(IMAGE_LOADER_EXTENSION) | 319 #if defined(IMAGE_LOADER_EXTENSION) |
| 314 Add(IDR_IMAGE_LOADER_MANIFEST, | 320 Add(IDR_IMAGE_LOADER_MANIFEST, |
| 315 base::FilePath(FILE_PATH_LITERAL("image_loader"))); | 321 base::FilePath(FILE_PATH_LITERAL("image_loader"))); |
| 316 #endif // defined(IMAGE_LOADER_EXTENSION) | 322 #endif // defined(IMAGE_LOADER_EXTENSION) |
| 317 } | 323 } |
| 318 | 324 |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); | 645 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); |
| 640 fileapi::FileSystemContext* file_system_context = | 646 fileapi::FileSystemContext* file_system_context = |
| 641 content::BrowserContext::GetStoragePartitionForSite( | 647 content::BrowserContext::GetStoragePartitionForSite( |
| 642 off_the_record_context, site)->GetFileSystemContext(); | 648 off_the_record_context, site)->GetFileSystemContext(); |
| 643 file_system_context->EnableTemporaryFileSystemInIncognito(); | 649 file_system_context->EnableTemporaryFileSystemInIncognito(); |
| 644 } | 650 } |
| 645 #endif | 651 #endif |
| 646 } | 652 } |
| 647 | 653 |
| 648 } // namespace extensions | 654 } // namespace extensions |
| OLD | NEW |