Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1014)

Unified Diff: chrome/browser/extensions/api/terminal/terminal_extension_helper.cc

Issue 9826032: hterm: Load component-extension version of crosh+hterm (chromeos only). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add manifest.json file Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/extensions/component_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/terminal/terminal_extension_helper.cc
diff --git a/chrome/browser/extensions/api/terminal/terminal_extension_helper.cc b/chrome/browser/extensions/api/terminal/terminal_extension_helper.cc
index 62f74b060c61909c994c1a7d5721dc4ecca52dde..4bae6a43098d1167d4628ddb19aa5443486248d1 100644
--- a/chrome/browser/extensions/api/terminal/terminal_extension_helper.cc
+++ b/chrome/browser/extensions/api/terminal/terminal_extension_helper.cc
@@ -13,19 +13,22 @@ namespace {
const char kCroshExtensionEntryPoint[] = "/html/crosh.html";
const Extension* GetTerminalExtension(Profile* profile) {
+ // Search order for terminal extensions.
+ // We prefer hterm-dev, then hterm, then the builtin crosh extension.
static const char* kPossibleAppIds[] = {
+ extension_misc::kHTermDevAppId,
extension_misc::kHTermAppId,
- extension_misc::kHTermDevAppId
+ extension_misc::kCroshBuiltinAppId,
};
- // The production app should be first in the list.
- DCHECK_EQ(kPossibleAppIds[0], extension_misc::kHTermAppId);
+ // The hterm-dev should be first in the list.
+ DCHECK_EQ(kPossibleAppIds[0], extension_misc::kHTermDevAppId);
ExtensionService* service = profile->GetExtensionService();
for (size_t x = 0; x < arraysize(kPossibleAppIds); ++x) {
const Extension* extension = service->GetExtensionById(
kPossibleAppIds[x], false);
- if (extension)
+ if (extension && service->IsExtensionEnabled(kPossibleAppIds[x]))
tonibarzic 2012/03/22 23:53:56 false in GetExtensionById(id, false) is for "inclu
rginda 2012/03/23 00:03:17 Done.
return extension;
}
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/extensions/component_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698