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

Unified Diff: chrome/renderer/extensions/webstore_bindings.cc

Issue 65163003: Move GetWebstoreLaunchURL and GetWebstoreItemDetailURLPrefix to extensions/common/extension_urls.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mt Created 7 years, 1 month 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/common/extensions/permissions/permissions_data.cc ('k') | extensions/common/extension_urls.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/webstore_bindings.cc
diff --git a/chrome/renderer/extensions/webstore_bindings.cc b/chrome/renderer/extensions/webstore_bindings.cc
index 6237a24f74dd4957c5e0890e58055b09b0c6ab64..a165a5eebf8425f050434da1c50f07131b60ab44 100644
--- a/chrome/renderer/extensions/webstore_bindings.cc
+++ b/chrome/renderer/extensions/webstore_bindings.cc
@@ -6,10 +6,10 @@
#include "base/strings/string_util.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/renderer/extensions/chrome_v8_context.h"
#include "content/public/renderer/render_view.h"
+#include "extensions/common/extension_urls.h"
#include "grit/renderer_resources.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
@@ -138,8 +138,7 @@ bool WebstoreBindings::GetWebstoreItemIdFromFrame(
return false;
}
- GURL webstore_base_url =
- GURL(extension_urls::GetWebstoreItemDetailURLPrefix());
+ GURL webstore_base_url(GetWebstoreItemDetailURLPrefix());
WebNodeList children = head.childNodes();
for (unsigned i = 0; i < children.length(); ++i) {
WebNode child = children.item(i);
@@ -178,14 +177,13 @@ bool WebstoreBindings::GetWebstoreItemIdFromFrame(
std::string candidate_webstore_item_id = webstore_url.path().substr(
webstore_base_url.path().length());
- if (!extensions::Extension::IdIsValid(candidate_webstore_item_id)) {
+ if (!Extension::IdIsValid(candidate_webstore_item_id)) {
*error = kInvalidWebstoreItemUrlError;
return false;
}
std::string reconstructed_webstore_item_url_string =
- extension_urls::GetWebstoreItemDetailURLPrefix() +
- candidate_webstore_item_id;
+ GetWebstoreItemDetailURLPrefix() + candidate_webstore_item_id;
if (reconstructed_webstore_item_url_string != webstore_url_string) {
*error = kInvalidWebstoreItemUrlError;
return false;
« no previous file with comments | « chrome/common/extensions/permissions/permissions_data.cc ('k') | extensions/common/extension_urls.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698