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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 6
7 #include "base/command_line.h"
8 #include "base/string_util.h"
9 #include "chrome/common/chrome_switches.h"
10
7 namespace extension_manifest_keys { 11 namespace extension_manifest_keys {
8 12
9 const char* kAllFrames = "all_frames"; 13 const char* kAllFrames = "all_frames";
10 const char* kAltKey = "altKey"; 14 const char* kAltKey = "altKey";
11 const char* kApp = "app"; 15 const char* kApp = "app";
12 const char* kBackground = "background_page"; 16 const char* kBackground = "background_page";
13 const char* kBrowserAction = "browser_action"; 17 const char* kBrowserAction = "browser_action";
14 const char* kChromeURLOverrides = "chrome_url_overrides"; 18 const char* kChromeURLOverrides = "chrome_url_overrides";
15 const char* kContentScripts = "content_scripts"; 19 const char* kContentScripts = "content_scripts";
16 const char* kContentSecurityPolicy = "content_security_policy"; 20 const char* kContentSecurityPolicy = "content_security_policy";
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 const char* kBookmarkManagerId = "eemcgdkfndhakfknompkggombfjjjeno"; 425 const char* kBookmarkManagerId = "eemcgdkfndhakfknompkggombfjjjeno";
422 const char* kWebStoreAppId = "ahfgeienlihckogmohjhadlkjgocpleb"; 426 const char* kWebStoreAppId = "ahfgeienlihckogmohjhadlkjgocpleb";
423 const char* kCloudPrintAppId = "mfehgcgbbipciphmccgaenjidiccnmng"; 427 const char* kCloudPrintAppId = "mfehgcgbbipciphmccgaenjidiccnmng";
424 const char* kAppsPromoHistogram = "Extensions.AppsPromo"; 428 const char* kAppsPromoHistogram = "Extensions.AppsPromo";
425 const char* kAppLaunchHistogram = "Extensions.AppLaunch"; 429 const char* kAppLaunchHistogram = "Extensions.AppLaunch";
426 #if defined(OS_CHROMEOS) 430 #if defined(OS_CHROMEOS)
427 const char* kAccessExtensionPath = 431 const char* kAccessExtensionPath =
428 "/usr/share/chromeos-assets/accessibility/extensions"; 432 "/usr/share/chromeos-assets/accessibility/extensions";
429 const char* kChromeVoxDirectoryName = "access_chromevox"; 433 const char* kChromeVoxDirectoryName = "access_chromevox";
430 #endif 434 #endif
435
436 std::string GetWebstoreLaunchURL() {
437 std::string gallery_prefix = extension_urls::kGalleryBrowsePrefix;
438 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsGalleryURL))
439 gallery_prefix = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
440 switches::kAppsGalleryURL);
441 if (EndsWith(gallery_prefix, "/", true))
442 gallery_prefix = gallery_prefix.substr(0, gallery_prefix.length() - 1);
443 return gallery_prefix;
431 } 444 }
445
446 std::string GetWebstoreItemDetailURLPrefix() {
447 return GetWebstoreLaunchURL() + "/detail/";
448 }
449
450 }
OLDNEW
« 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