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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/common/extensions/extension_constants.cc » ('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) 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 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "googleurl/src/gurl.h"
12 13
13 // Keys used in JSON representation of extensions. 14 // Keys used in JSON representation of extensions.
14 namespace extension_manifest_keys { 15 namespace extension_manifest_keys {
15 extern const char* kAllFrames; 16 extern const char* kAllFrames;
16 extern const char* kAltKey; 17 extern const char* kAltKey;
17 extern const char* kApp; 18 extern const char* kApp;
18 extern const char* kBackground; 19 extern const char* kBackground;
19 extern const char* kBrowserAction; 20 extern const char* kBrowserAction;
20 extern const char* kBrowseURLs; 21 extern const char* kBrowseURLs;
21 extern const char* kChromeURLOverrides; 22 extern const char* kChromeURLOverrides;
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 extern const char* kReservedMessageFound; 262 extern const char* kReservedMessageFound;
262 extern const char* kSidebarExperimental; 263 extern const char* kSidebarExperimental;
263 extern const char* kThemesCannotContainExtensions; 264 extern const char* kThemesCannotContainExtensions;
264 extern const char* kWebContentMustBeEnabled; 265 extern const char* kWebContentMustBeEnabled;
265 #if defined(OS_CHROMEOS) 266 #if defined(OS_CHROMEOS)
266 extern const char* kIllegalPlugins; 267 extern const char* kIllegalPlugins;
267 #endif 268 #endif
268 } // namespace extension_manifest_errors 269 } // namespace extension_manifest_errors
269 270
270 namespace extension_urls { 271 namespace extension_urls {
272 // Returns the URL prefix for the extension/apps gallery. Can be set via the
273 // --apps-gallery-url switch. The URL returned will not contain a trailing
274 // slash. Do not use this as a prefix/extent for the store. Instead see
275 // ExtensionService::GetWebStoreApp or
276 // ExtensionService::IsDownloadFromGallery
277 std::string GetWebstoreLaunchURL();
278
279 // Returns the URL prefix for an item in the extension/app gallery. This URL
280 // will contain a trailing slash and should be concatenated with an item ID
281 // to get the item detail URL.
282 std::string GetWebstoreItemDetailURLPrefix();
283
284 // Return the update URL used by gallery/webstore extensions/apps. The
285 // |secure| parameter will be ignored if the update URL is overriden with
286 // --apps-gallery-update-url.
287 GURL GetWebstoreUpdateUrl(bool secure);
288
289 // Return the URL for an extension/app's .crx file that is hosted by the
290 // webstore.
291 GURL GetWebstoreInstallUrl(const std::string& extension_id,
292 const std::string& locale);
293
271 // The greatest common prefixes of the main extensions gallery's browse and 294 // The greatest common prefixes of the main extensions gallery's browse and
272 // download URLs. 295 // download URLs.
273 extern const char* kGalleryBrowsePrefix; 296 extern const char* kGalleryBrowsePrefix;
274 297
275 // Same thing for the "minigallery". The minigallery is the temporary static 298 // Same thing for the "minigallery". The minigallery is the temporary static
276 // themes gallery that we put up when we launched themes. 299 // themes gallery that we put up when we launched themes.
277 extern const char* kMiniGalleryBrowsePrefix; 300 extern const char* kMiniGalleryBrowsePrefix;
278 extern const char* kMiniGalleryDownloadPrefix; 301 extern const char* kMiniGalleryDownloadPrefix;
279 } // namespace extension_urls 302 } // namespace extension_urls
280 303
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 INSTALL_CAUSE_EXTERNAL_FILE, 436 INSTALL_CAUSE_EXTERNAL_FILE,
414 INSTALL_CAUSE_AUTOMATION, 437 INSTALL_CAUSE_AUTOMATION,
415 NUM_INSTALL_CAUSES 438 NUM_INSTALL_CAUSES
416 }; 439 };
417 440
418 enum UnloadedExtensionReason { 441 enum UnloadedExtensionReason {
419 UNLOAD_REASON_DISABLE, // Extension is being disabled. 442 UNLOAD_REASON_DISABLE, // Extension is being disabled.
420 UNLOAD_REASON_UPDATE, // Extension is being updated to a newer version. 443 UNLOAD_REASON_UPDATE, // Extension is being updated to a newer version.
421 UNLOAD_REASON_UNINSTALL, // Extension is being uninstalled. 444 UNLOAD_REASON_UNINSTALL, // Extension is being uninstalled.
422 }; 445 };
423 446 } // extension_misc
424 // Returns the URL prefix for the extension/apps gallery. Can be set via the
425 // --apps-gallery-url switch. The URL returned will not contain a trailing
426 // slash. Do not use this as a prefix/extent for the store. Instead see
427 // ExtensionService::GetWebStoreApp or
428 // ExtensionService::IsDownloadFromGallery
429 std::string GetWebstoreLaunchURL();
430
431 // Returns the URL prefix for an item in the extension/app gallery. This URL
432 // will contain a trailing slash and should be concatenated with an item ID
433 // to get the item detail URL.
434 std::string GetWebstoreItemDetailURLPrefix();
435 } // extension_misc
436 447
437 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ 448 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_
OLDNEW
« 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