| 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 | 348 |
| 349 void ComponentLoader::AddDefaultComponentExtensions( | 349 void ComponentLoader::AddDefaultComponentExtensions( |
| 350 bool skip_session_components) { | 350 bool skip_session_components) { |
| 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 Add(IDR_GENIUS_APP_MANIFEST, base::FilePath(FILE_PATH_LITERAL( |
| 359 "/usr/share/chromeos-assets/genius_app"))); |
| 358 if (browser_defaults::enable_help_app) { | 360 if (browser_defaults::enable_help_app) { |
| 359 Add(IDR_HELP_MANIFEST, base::FilePath(FILE_PATH_LITERAL( | 361 Add(IDR_HELP_MANIFEST, base::FilePath(FILE_PATH_LITERAL( |
| 360 "/usr/share/chromeos-assets/helpapp"))); | 362 "/usr/share/chromeos-assets/helpapp"))); |
| 361 } | 363 } |
| 362 #endif | 364 #endif |
| 363 | 365 |
| 364 // Skip all other extensions that require user session presence. | 366 // Skip all other extensions that require user session presence. |
| 365 if (!skip_session_components) { | 367 if (!skip_session_components) { |
| 366 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 368 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 367 if (!command_line->HasSwitch(chromeos::switches::kGuestSession)) | 369 if (!command_line->HasSwitch(chromeos::switches::kGuestSession)) |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 | 500 |
| 499 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { | 501 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { |
| 500 delete component->manifest; | 502 delete component->manifest; |
| 501 if (extension_service_->is_ready()) { | 503 if (extension_service_->is_ready()) { |
| 502 extension_service_-> | 504 extension_service_-> |
| 503 RemoveComponentExtension(component->extension_id); | 505 RemoveComponentExtension(component->extension_id); |
| 504 } | 506 } |
| 505 } | 507 } |
| 506 | 508 |
| 507 } // namespace extensions | 509 } // namespace extensions |
| OLD | NEW |