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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 // Do not add component extensions that have background pages here -- add them | 351 // Do not add component extensions that have background pages here -- add them |
352 // to AddDefaultComponentExtensionsWithBackgroundPages. | 352 // to AddDefaultComponentExtensionsWithBackgroundPages. |
353 #if defined(OS_CHROMEOS) | 353 #if defined(OS_CHROMEOS) |
354 Add(IDR_MOBILE_MANIFEST, | 354 Add(IDR_MOBILE_MANIFEST, |
355 base::FilePath(FILE_PATH_LITERAL("/usr/share/chromeos-assets/mobile"))); | 355 base::FilePath(FILE_PATH_LITERAL("/usr/share/chromeos-assets/mobile"))); |
356 | 356 |
357 #if defined(GOOGLE_CHROME_BUILD) | 357 #if defined(GOOGLE_CHROME_BUILD) |
358 { | 358 { |
359 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 359 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
360 if (!command_line->HasSwitch(chromeos::switches::kDisableGeniusApp)) { | 360 if (!command_line->HasSwitch(chromeos::switches::kDisableGeniusApp)) { |
361 Add(IDR_GENIUS_APP_MANIFEST, base::FilePath(FILE_PATH_LITERAL( | 361 AddWithName(IDR_GENIUS_APP_MANIFEST, |
362 "/usr/share/chromeos-assets/genius_app"))); | 362 base::FilePath(FILE_PATH_LITERAL( |
| 363 "/usr/share/chromeos-assets/genius_app")), |
| 364 l10n_util::GetStringUTF8(IDS_GENIUS_APP_NAME)); |
363 } | 365 } |
364 } | 366 } |
365 if (browser_defaults::enable_help_app) { | 367 if (browser_defaults::enable_help_app) { |
366 Add(IDR_HELP_MANIFEST, base::FilePath(FILE_PATH_LITERAL( | 368 Add(IDR_HELP_MANIFEST, base::FilePath(FILE_PATH_LITERAL( |
367 "/usr/share/chromeos-assets/helpapp"))); | 369 "/usr/share/chromeos-assets/helpapp"))); |
368 } | 370 } |
369 #endif | 371 #endif |
370 | 372 |
371 // Skip all other extensions that require user session presence. | 373 // Skip all other extensions that require user session presence. |
372 if (!skip_session_components) { | 374 if (!skip_session_components) { |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 | 507 |
506 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { | 508 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { |
507 delete component->manifest; | 509 delete component->manifest; |
508 if (extension_service_->is_ready()) { | 510 if (extension_service_->is_ready()) { |
509 extension_service_-> | 511 extension_service_-> |
510 RemoveComponentExtension(component->extension_id); | 512 RemoveComponentExtension(component->extension_id); |
511 } | 513 } |
512 } | 514 } |
513 | 515 |
514 } // namespace extensions | 516 } // namespace extensions |
OLD | NEW |