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

Unified Diff: chrome/browser/extensions/extension.cc

Issue 39285: Support loading extensions into the bookmark toolbar. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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/extensions/extension.h ('k') | chrome/browser/extensions/extension_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)) {
« no previous file with comments | « chrome/browser/extensions/extension.h ('k') | chrome/browser/extensions/extension_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698