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 <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 } | 366 } |
367 if (browser_defaults::enable_help_app) { | 367 if (browser_defaults::enable_help_app) { |
368 Add(IDR_HELP_MANIFEST, base::FilePath(FILE_PATH_LITERAL( | 368 Add(IDR_HELP_MANIFEST, base::FilePath(FILE_PATH_LITERAL( |
369 "/usr/share/chromeos-assets/helpapp"))); | 369 "/usr/share/chromeos-assets/helpapp"))); |
370 } | 370 } |
371 #endif | 371 #endif |
372 | 372 |
373 // Skip all other extensions that require user session presence. | 373 // Skip all other extensions that require user session presence. |
374 if (!skip_session_components) { | 374 if (!skip_session_components) { |
375 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 375 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
376 if (!command_line->HasSwitch(chromeos::switches::kGuestSession)) | 376 if (!command_line->HasSwitch(chromeos::switches::kGuestSession)) { |
377 Add(IDR_BOOKMARKS_MANIFEST, | 377 Add(IDR_BOOKMARKS_MANIFEST, |
378 base::FilePath(FILE_PATH_LITERAL("bookmark_manager"))); | 378 base::FilePath(FILE_PATH_LITERAL("bookmark_manager"))); |
| 379 #if defined(ENABLE_ENHANCED_BOOKMARKS) |
| 380 Add(IDR_ENHANCED_BOOKMARKS_MANIFEST, |
| 381 base::FilePath(FILE_PATH_LITERAL("enhanced_bookmark_manager"))); |
| 382 #endif |
| 383 } |
379 | 384 |
380 Add(IDR_CROSH_BUILTIN_MANIFEST, base::FilePath(FILE_PATH_LITERAL( | 385 Add(IDR_CROSH_BUILTIN_MANIFEST, base::FilePath(FILE_PATH_LITERAL( |
381 "/usr/share/chromeos-assets/crosh_builtin"))); | 386 "/usr/share/chromeos-assets/crosh_builtin"))); |
382 } | 387 } |
383 #else // !defined(OS_CHROMEOS) | 388 #else // !defined(OS_CHROMEOS) |
384 DCHECK(!skip_session_components); | 389 DCHECK(!skip_session_components); |
385 Add(IDR_BOOKMARKS_MANIFEST, | 390 Add(IDR_BOOKMARKS_MANIFEST, |
386 base::FilePath(FILE_PATH_LITERAL("bookmark_manager"))); | 391 base::FilePath(FILE_PATH_LITERAL("bookmark_manager"))); |
| 392 #if defined(ENABLE_ENHANCED_BOOKMARKS) |
| 393 Add(IDR_ENHANCED_BOOKMARKS_MANIFEST, |
| 394 base::FilePath(FILE_PATH_LITERAL("enhanced_bookmark_manager"))); |
| 395 #endif |
387 // Cloud Print component app. Not required on Chrome OS. | 396 // Cloud Print component app. Not required on Chrome OS. |
388 Add(IDR_CLOUDPRINT_MANIFEST, | 397 Add(IDR_CLOUDPRINT_MANIFEST, |
389 base::FilePath(FILE_PATH_LITERAL("cloud_print"))); | 398 base::FilePath(FILE_PATH_LITERAL("cloud_print"))); |
390 #endif | 399 #endif |
391 | 400 |
392 if (!skip_session_components) { | 401 if (!skip_session_components) { |
393 AddWebStoreApp(); | 402 AddWebStoreApp(); |
394 AddChromeApp(); | 403 AddChromeApp(); |
395 } | 404 } |
396 | 405 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 | 516 |
508 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { | 517 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { |
509 delete component->manifest; | 518 delete component->manifest; |
510 if (extension_service_->is_ready()) { | 519 if (extension_service_->is_ready()) { |
511 extension_service_-> | 520 extension_service_-> |
512 RemoveComponentExtension(component->extension_id); | 521 RemoveComponentExtension(component->extension_id); |
513 } | 522 } |
514 } | 523 } |
515 | 524 |
516 } // namespace extensions | 525 } // namespace extensions |
OLD | NEW |