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

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: 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
Index: chrome/renderer/extensions/webstore_bindings.cc
diff --git a/chrome/renderer/extensions/webstore_bindings.cc b/chrome/renderer/extensions/webstore_bindings.cc
index ad50c423bdd493a16df98a5c4e6367181cb2877d..49ce2febcc0711adb77c44ca9069e7f9bf14d44b 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;

Powered by Google App Engine
This is Rietveld 408576698