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

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

Issue 7621032: Initial inline web store install bindings. (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_constants.h ('k') | chrome/common/extensions/extension_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_constants.cc
diff --git a/chrome/common/extensions/extension_constants.cc b/chrome/common/extensions/extension_constants.cc
index a0eb53f96d0f7b407a12baaa4d65e6891444bdcf..8b9f07c9c9c3941f81ed69e296118a18be29d415 100644
--- a/chrome/common/extensions/extension_constants.cc
+++ b/chrome/common/extensions/extension_constants.cc
@@ -4,6 +4,10 @@
#include "chrome/common/extensions/extension_constants.h"
+#include "base/command_line.h"
+#include "base/string_util.h"
+#include "chrome/common/chrome_switches.h"
+
namespace extension_manifest_keys {
const char* kAllFrames = "all_frames";
@@ -428,4 +432,19 @@ const char* kAccessExtensionPath =
"/usr/share/chromeos-assets/accessibility/extensions";
const char* kChromeVoxDirectoryName = "access_chromevox";
#endif
+
+std::string GetWebstoreLaunchURL() {
+ std::string gallery_prefix = extension_urls::kGalleryBrowsePrefix;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsGalleryURL))
+ gallery_prefix = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kAppsGalleryURL);
+ if (EndsWith(gallery_prefix, "/", true))
+ gallery_prefix = gallery_prefix.substr(0, gallery_prefix.length() - 1);
+ return gallery_prefix;
+}
+
+std::string GetWebstoreItemDetailURLPrefix() {
+ return GetWebstoreLaunchURL() + "/detail/";
+}
+
}
« no previous file with comments | « chrome/common/extensions/extension_constants.h ('k') | chrome/common/extensions/extension_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698