Index: chrome/browser/extensions/extension.cc |
=================================================================== |
--- chrome/browser/extensions/extension.cc (revision 11270) |
+++ chrome/browser/extensions/extension.cc (working copy) |
@@ -26,6 +26,7 @@ |
const wchar_t* Extension::kZipHashKey = L"zip_hash"; |
const wchar_t* Extension::kPluginsDirKey = L"plugins_dir"; |
const wchar_t* Extension::kThemeKey = L"theme"; |
+const wchar_t* Extension::kToolstripKey = L"toolstrip"; |
const char* Extension::kRunAtDocumentStartValue = "document_start"; |
const char* Extension::kRunAtDocumentEndValue = "document_end"; |
@@ -70,6 +71,8 @@ |
"Required key 'zip_hash' is missing or invalid."; |
const char* Extension::kInvalidPluginsDirError = |
"Invalid value for 'plugins_dir'."; |
+const char* Extension::kInvalidToolstripError = |
+ "Invalid value for 'toolstrip'."; |
const size_t Extension::kIdSize = 20; // SHA1 (160 bits) == 20 bytes |
@@ -260,6 +263,16 @@ |
plugins_dir_ = path_.AppendASCII(plugins_dir); |
} |
+ // Initialize toolstrip (optional). |
+ if (source.HasKey(kToolstripKey)) { |
+ std::string toolstrip_path; |
+ if (!source.GetString(kToolstripKey, &toolstrip_path)) { |
+ *error = kInvalidToolstripError; |
+ return false; |
+ } |
+ toolstrip_url_ = GetResourceURL(extension_url_, toolstrip_path); |
+ } |
+ |
if (source.HasKey(kThemeKey)) { |
DictionaryValue* dict_value; |
if (source.GetDictionary(kThemeKey, &dict_value)) { |