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

Side by Side Diff: chrome/common/extensions/extension_constants.cc

Issue 11276036: Fix "Get more extensions" link in about:extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/extensions/extension_constants.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/extensions/extension_constants.h" 5 #include "chrome/common/extensions/extension_constants.h"
6 #include "chrome/common/extensions/extension_manifest_constants.h" 6 #include "chrome/common/extensions/extension_manifest_constants.h"
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
13 #include "chrome/common/net/url_util.h" 13 #include "chrome/common/net/url_util.h"
14 14
15 namespace extension_urls { 15 namespace extension_urls {
16 16
17 std::string GetWebstoreLaunchURL() { 17 std::string GetWebstoreLaunchURL() {
18 std::string gallery_prefix = kGalleryBrowsePrefix; 18 std::string gallery_prefix = kGalleryBrowsePrefix;
19 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsGalleryURL)) 19 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsGalleryURL))
20 gallery_prefix = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 20 gallery_prefix = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
21 switches::kAppsGalleryURL); 21 switches::kAppsGalleryURL);
22 if (EndsWith(gallery_prefix, "/", true)) 22 if (EndsWith(gallery_prefix, "/", true))
23 gallery_prefix = gallery_prefix.substr(0, gallery_prefix.length() - 1); 23 gallery_prefix = gallery_prefix.substr(0, gallery_prefix.length() - 1);
24 return gallery_prefix; 24 return gallery_prefix;
25 } 25 }
26 26
27 std::string GetExtensionGalleryURL() {
28 return GetWebstoreLaunchURL() + "/category/extensions";
29 }
30
27 std::string GetWebstoreItemDetailURLPrefix() { 31 std::string GetWebstoreItemDetailURLPrefix() {
28 return GetWebstoreLaunchURL() + "/detail/"; 32 return GetWebstoreLaunchURL() + "/detail/";
29 } 33 }
30 34
31 GURL GetWebstoreIntentQueryURL(const std::string& action, 35 GURL GetWebstoreIntentQueryURL(const std::string& action,
32 const std::string& type) { 36 const std::string& type) {
33 const char kIntentsCategoryPath[] = "category/collection/webintent_apps"; 37 const char kIntentsCategoryPath[] = "category/collection/webintent_apps";
34 38
35 GURL url(std::string(kGalleryBrowsePrefix) + "/"); 39 GURL url(std::string(kGalleryBrowsePrefix) + "/");
36 url = url.Resolve(kIntentsCategoryPath); 40 url = url.Resolve(kIntentsCategoryPath);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 175
172 const int kScriptBadgeIconSizes[] = { 176 const int kScriptBadgeIconSizes[] = {
173 EXTENSION_ICON_BITTY, // 16 177 EXTENSION_ICON_BITTY, // 16
174 2 * EXTENSION_ICON_BITTY // 32 178 2 * EXTENSION_ICON_BITTY // 32
175 }; 179 };
176 180
177 const size_t kNumScriptBadgeIconSizes = 181 const size_t kNumScriptBadgeIconSizes =
178 arraysize(kScriptBadgeIconSizes); 182 arraysize(kScriptBadgeIconSizes);
179 183
180 } // namespace extension_misc 184 } // namespace extension_misc
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_constants.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698