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

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

Issue 6378009: Only allow extension pages to be displayed in the sidebar to be consistent... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/app/generated_resources.grd ('k') | chrome/browser/sidebar/sidebar_container.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_sidebar_api.cc
===================================================================
--- chrome/browser/extensions/extension_sidebar_api.cc (revision 72219)
+++ chrome/browser/extensions/extension_sidebar_api.cc (working copy)
@@ -37,10 +37,10 @@
// Keys.
const char kBadgeTextKey[] = "text";
const char kImageDataKey[] = "imageData";
+const char kPathKey[] = "path";
const char kStateKey[] = "state";
const char kTabIdKey[] = "tabId";
const char kTitleKey[] = "title";
-const char kUrlKey[] = "url";
// Events.
const char kOnStateChanged[] = "experimental.sidebar.onStateChanged";
} // namespace
@@ -204,11 +204,11 @@
bool NavigateSidebarFunction::RunImpl(TabContents* tab,
const std::string& content_id,
const DictionaryValue& details) {
- std::string url_string;
- EXTENSION_FUNCTION_VALIDATE(details.GetString(kUrlKey, &url_string));
+ std::string path_string;
+ EXTENSION_FUNCTION_VALIDATE(details.GetString(kPathKey, &path_string));
- GURL url = extension_sidebar_utils::ResolveAndVerifyUrl(
- url_string, GetExtension(), &error_);
+ GURL url = extension_sidebar_utils::ResolveRelativePath(
+ path_string, GetExtension(), &error_);
if (!url.is_valid())
return false;
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/sidebar/sidebar_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698