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

Unified Diff: chrome/common/extensions/extension_constants.h

Issue 7743004: Move extension/webstore-related URL getters to the extension_urls namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback. Created 9 years, 4 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/common/extensions/extension.cc ('k') | chrome/common/extensions/extension_constants.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_constants.h
diff --git a/chrome/common/extensions/extension_constants.h b/chrome/common/extensions/extension_constants.h
index 976e4c181e5d9ef7688cd47235a256079b8cc026..925b38f948e4fa6d5b405a36258efa2a0217cf61 100644
--- a/chrome/common/extensions/extension_constants.h
+++ b/chrome/common/extensions/extension_constants.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/basictypes.h"
+#include "googleurl/src/gurl.h"
// Keys used in JSON representation of extensions.
namespace extension_manifest_keys {
@@ -268,6 +269,28 @@ namespace extension_manifest_errors {
} // namespace extension_manifest_errors
namespace extension_urls {
+ // Returns the URL prefix for the extension/apps gallery. Can be set via the
+ // --apps-gallery-url switch. The URL returned will not contain a trailing
+ // slash. Do not use this as a prefix/extent for the store. Instead see
+ // ExtensionService::GetWebStoreApp or
+ // ExtensionService::IsDownloadFromGallery
+ std::string GetWebstoreLaunchURL();
+
+ // Returns the URL prefix for an item in the extension/app gallery. This URL
+ // will contain a trailing slash and should be concatenated with an item ID
+ // to get the item detail URL.
+ std::string GetWebstoreItemDetailURLPrefix();
+
+ // Return the update URL used by gallery/webstore extensions/apps. The
+ // |secure| parameter will be ignored if the update URL is overriden with
+ // --apps-gallery-update-url.
+ GURL GetWebstoreUpdateUrl(bool secure);
+
+ // Return the URL for an extension/app's .crx file that is hosted by the
+ // webstore.
+ GURL GetWebstoreInstallUrl(const std::string& extension_id,
+ const std::string& locale);
+
// The greatest common prefixes of the main extensions gallery's browse and
// download URLs.
extern const char* kGalleryBrowsePrefix;
@@ -420,18 +443,6 @@ namespace extension_misc {
UNLOAD_REASON_UPDATE, // Extension is being updated to a newer version.
UNLOAD_REASON_UNINSTALL, // Extension is being uninstalled.
};
-
- // Returns the URL prefix for the extension/apps gallery. Can be set via the
- // --apps-gallery-url switch. The URL returned will not contain a trailing
- // slash. Do not use this as a prefix/extent for the store. Instead see
- // ExtensionService::GetWebStoreApp or
- // ExtensionService::IsDownloadFromGallery
- std::string GetWebstoreLaunchURL();
-
- // Returns the URL prefix for an item in the extension/app gallery. This URL
- // will contain a trailing slash and should be concatenated with an item ID
- // to get the item detail URL.
- std::string GetWebstoreItemDetailURLPrefix();
-} // extension_misc
+} // extension_misc
#endif // CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/common/extensions/extension_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698