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

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

Issue 10544195: Show an extension info bubble when a script badge is clicked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase eh Created 8 years, 6 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
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/common/url_constants.h » ('j') | 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 std::string GetWebstoreLaunchURL() { 17 std::string GetWebstoreLaunchURL() {
17 std::string gallery_prefix = kGalleryBrowsePrefix; 18 std::string gallery_prefix = kGalleryBrowsePrefix;
18 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsGalleryURL)) 19 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsGalleryURL))
19 gallery_prefix = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 20 gallery_prefix = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
20 switches::kAppsGalleryURL); 21 switches::kAppsGalleryURL);
21 if (EndsWith(gallery_prefix, "/", true)) 22 if (EndsWith(gallery_prefix, "/", true))
22 gallery_prefix = gallery_prefix.substr(0, gallery_prefix.length() - 1); 23 gallery_prefix = gallery_prefix.substr(0, gallery_prefix.length() - 1);
23 return gallery_prefix; 24 return gallery_prefix;
24 } 25 }
25 26
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // therefore not determined by Chromium. If the location of the blacklist file 72 // therefore not determined by Chromium. If the location of the blacklist file
72 // ever changes, we need to update this function. A DCHECK in the 73 // ever changes, we need to update this function. A DCHECK in the
73 // ExtensionUpdater ensures that we notice a change. This is the full URL 74 // ExtensionUpdater ensures that we notice a change. This is the full URL
74 // of a blacklist: 75 // of a blacklist:
75 // http://www.gstatic.com/chrome/extensions/blacklist/l_0_0_0_7.txt 76 // http://www.gstatic.com/chrome/extensions/blacklist/l_0_0_0_7.txt
76 return StartsWithASCII(url.spec(), kExtensionBlocklistUrlPrefix, true) || 77 return StartsWithASCII(url.spec(), kExtensionBlocklistUrlPrefix, true) ||
77 StartsWithASCII(url.spec(), kExtensionBlocklistHttpsUrlPrefix, true); 78 StartsWithASCII(url.spec(), kExtensionBlocklistHttpsUrlPrefix, true);
78 } 79 }
79 80
80 const char kGalleryBrowsePrefix[] = "https://chrome.google.com/webstore"; 81 const char kGalleryBrowsePrefix[] = "https://chrome.google.com/webstore";
81 } 82
83 } // namespace extension_urls
82 84
83 namespace extension_filenames { 85 namespace extension_filenames {
86
84 const char kTempExtensionName[] = "CRX_INSTALL"; 87 const char kTempExtensionName[] = "CRX_INSTALL";
85 88
86 // The file to write our decoded images to, relative to the extension_path. 89 // The file to write our decoded images to, relative to the extension_path.
87 const char kDecodedImagesFilename[] = "DECODED_IMAGES"; 90 const char kDecodedImagesFilename[] = "DECODED_IMAGES";
88 91
89 // The file to write our decoded message catalogs to, relative to the 92 // The file to write our decoded message catalogs to, relative to the
90 // extension_path. 93 // extension_path.
91 const char kDecodedMessageCatalogsFilename[] = "DECODED_MESSAGE_CATALOGS"; 94 const char kDecodedMessageCatalogsFilename[] = "DECODED_MESSAGE_CATALOGS";
92 95
93 const char kGeneratedBackgroundPageFilename[] = 96 const char kGeneratedBackgroundPageFilename[] =
94 "_generated_background_page.html"; 97 "_generated_background_page.html";
95 } 98 }
96 99
97 // These must match the values expected by the chrome.management extension API. 100 // These must match the values expected by the chrome.management extension API.
98 namespace extension_info_keys { 101 namespace extension_info_keys {
99 const char kDescriptionKey[] = "description"; 102 const char kDescriptionKey[] = "description";
100 const char kEnabledKey[] = "enabled"; 103 const char kEnabledKey[] = "enabled";
101 const char kHomepageUrlKey[] = "homepageUrl"; 104 const char kHomepageUrlKey[] = "homepageUrl";
102 const char kIdKey[] = "id"; 105 const char kIdKey[] = "id";
103 const char kNameKey[] = "name"; 106 const char kNameKey[] = "name";
104 const char kOfflineEnabledKey[] = "offlineEnabled"; 107 const char kOfflineEnabledKey[] = "offlineEnabled";
105 const char kOptionsUrlKey[] = "optionsUrl"; 108 const char kOptionsUrlKey[] = "optionsUrl";
106 const char kVersionKey[] = "version"; 109 const char kVersionKey[] = "version";
107 } 110
111 } // namespace extension_filenames
108 112
109 namespace extension_misc { 113 namespace extension_misc {
110 const char kBookmarkManagerId[] = "eemcgdkfndhakfknompkggombfjjjeno"; 114 const char kBookmarkManagerId[] = "eemcgdkfndhakfknompkggombfjjjeno";
111 const char kCitrixReceiverAppId[] = "haiffjcadagjlijoggckpgfnoeiflnem"; 115 const char kCitrixReceiverAppId[] = "haiffjcadagjlijoggckpgfnoeiflnem";
112 const char kCitrixReceiverAppBetaId[] = "gnedhmakppccajfpfiihfcdlnpgomkcf"; 116 const char kCitrixReceiverAppBetaId[] = "gnedhmakppccajfpfiihfcdlnpgomkcf";
113 const char kCitrixReceiverAppDevId[] = "fjcibdnjlbfnbfdjneajpipnlcppleek"; 117 const char kCitrixReceiverAppDevId[] = "fjcibdnjlbfnbfdjneajpipnlcppleek";
114 const char kEnterpriseWebStoreAppId[] = "afchcafgojfnemjkcbhfekplkmjaldaa"; 118 const char kEnterpriseWebStoreAppId[] = "afchcafgojfnemjkcbhfekplkmjaldaa";
115 const char kHTermAppId[] = "pnhechapfaindjhompbnflcldabbghjo"; 119 const char kHTermAppId[] = "pnhechapfaindjhompbnflcldabbghjo";
116 const char kHTermDevAppId[] = "okddffdblfhhnmhodogpojmfkjmhinfp"; 120 const char kHTermDevAppId[] = "okddffdblfhhnmhodogpojmfkjmhinfp";
117 const char kCroshBuiltinAppId[] = "nkoccljplnhpfnfiajclkommnmllphnl"; 121 const char kCroshBuiltinAppId[] = "nkoccljplnhpfnfiajclkommnmllphnl";
(...skipping 10 matching lines...) Expand all
128 const char kAppStateNotInstalled[] = "not_installed"; 132 const char kAppStateNotInstalled[] = "not_installed";
129 const char kAppStateInstalled[] = "installed"; 133 const char kAppStateInstalled[] = "installed";
130 const char kAppStateDisabled[] = "disabled"; 134 const char kAppStateDisabled[] = "disabled";
131 const char kAppStateRunning[] = "running"; 135 const char kAppStateRunning[] = "running";
132 const char kAppStateCannotRun[] = "cannot_run"; 136 const char kAppStateCannotRun[] = "cannot_run";
133 const char kAppStateReadyToRun[] = "ready_to_run"; 137 const char kAppStateReadyToRun[] = "ready_to_run";
134 138
135 const char kAppNotificationsIncognitoError[] = 139 const char kAppNotificationsIncognitoError[] =
136 "This API is not accessible by 'split' mode " 140 "This API is not accessible by 'split' mode "
137 "extensions in incognito windows."; 141 "extensions in incognito windows.";
138 } 142
143 } // namespace extension_misc
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698