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

Unified Diff: chrome/browser/extensions/webstore_data_fetcher.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
Index: chrome/browser/extensions/webstore_data_fetcher.cc
diff --git a/chrome/browser/extensions/webstore_data_fetcher.cc b/chrome/browser/extensions/webstore_data_fetcher.cc
index 89d523b8135dc93f80fecf59adce350bffb011d3..5e99c8d0bbf71701dc8f7f0d55da7fb6efa06250 100644
--- a/chrome/browser/extensions/webstore_data_fetcher.cc
+++ b/chrome/browser/extensions/webstore_data_fetcher.cc
@@ -9,17 +9,24 @@
#include "chrome/browser/extensions/webstore_data_fetcher_delegate.h"
#include "chrome/browser/safe_json_parser.h"
#include "chrome/common/extensions/extension_constants.h"
+#include "extensions/common/extension_urls.h"
#include "net/base/load_flags.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_request_status.h"
+namespace extensions {
+
namespace {
const char kInvalidWebstoreResponseError[] = "Invalid Chrome Web Store reponse";
-} // namespace
+// Returns the URL used to get webstore data (ratings, manifest, icon URL,
+// etc.) about an extension from the webstore as JSON.
+GURL GetWebstoreItemJsonDataURL(const std::string& extension_id) {
+ return GURL(GetWebstoreLaunchURL() + "/inlineinstall/detail/" + extension_id);
+}
-namespace extensions {
+} // namespace
WebstoreDataFetcher::WebstoreDataFetcher(
WebstoreDataFetcherDelegate* delegate,
@@ -35,7 +42,7 @@ WebstoreDataFetcher::WebstoreDataFetcher(
WebstoreDataFetcher::~WebstoreDataFetcher() {}
void WebstoreDataFetcher::Start() {
- GURL webstore_data_url(extension_urls::GetWebstoreItemJsonDataURL(id_));
+ GURL webstore_data_url(GetWebstoreItemJsonDataURL(id_));
webstore_data_url_fetcher_.reset(net::URLFetcher::Create(
webstore_data_url, net::URLFetcher::GET, this));

Powered by Google App Engine
This is Rietveld 408576698