OLD | NEW |
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 #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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 // returns a JSON dictionary that has the search results (under "results"). | 34 // returns a JSON dictionary that has the search results (under "results"). |
35 // Each entry in the array is a dictionary as the data returned for | 35 // Each entry in the array is a dictionary as the data returned for |
36 // GetWebstoreItemJsonDataURL above. |query| is the user typed query string. | 36 // GetWebstoreItemJsonDataURL above. |query| is the user typed query string. |
37 // |hl| is the host language code, e.g. en_US. Both arguments will be escaped | 37 // |hl| is the host language code, e.g. en_US. Both arguments will be escaped |
38 // and added as a query parameter to the returned web store json search URL. | 38 // and added as a query parameter to the returned web store json search URL. |
39 GURL GetWebstoreJsonSearchUrl(const std::string& query, const std::string& hl); | 39 GURL GetWebstoreJsonSearchUrl(const std::string& query, const std::string& hl); |
40 | 40 |
41 // Returns the URL of the web store search results page for |query|. | 41 // Returns the URL of the web store search results page for |query|. |
42 GURL GetWebstoreSearchPageUrl(const std::string& query); | 42 GURL GetWebstoreSearchPageUrl(const std::string& query); |
43 | 43 |
44 // Return the update URL used by gallery/webstore extensions/apps. | 44 // Return the update URL used by gallery/webstore extensions/apps. This may |
| 45 // have been overridden by a command line flag for testing purposes. |
45 GURL GetWebstoreUpdateUrl(); | 46 GURL GetWebstoreUpdateUrl(); |
46 | 47 |
| 48 // This returns the compile-time constant webstore update url. Usually you |
| 49 // should prefer using GetWebstoreUpdateUrl. |
| 50 GURL GetDefaultWebstoreUpdateUrl(); |
| 51 |
47 // Returns whether the URL is the webstore update URL (just considering host | 52 // Returns whether the URL is the webstore update URL (just considering host |
48 // and path, not scheme, query, etc.) | 53 // and path, not scheme, query, etc.) |
49 bool IsWebstoreUpdateUrl(const GURL& update_url); | 54 bool IsWebstoreUpdateUrl(const GURL& update_url); |
50 | 55 |
51 // Returns true if the URL points to an extension blacklist. | 56 // Returns true if the URL points to an extension blacklist. |
52 bool IsBlacklistUpdateUrl(const GURL& url); | 57 bool IsBlacklistUpdateUrl(const GURL& url); |
53 // The greatest common prefixes of the main extensions gallery's browse and | 58 // The greatest common prefixes of the main extensions gallery's browse and |
54 // download URLs. | 59 // download URLs. |
55 extern const char kGalleryBrowsePrefix[]; | 60 extern const char kGalleryBrowsePrefix[]; |
56 | 61 |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 LAUNCH_CONTAINER_PANEL, | 321 LAUNCH_CONTAINER_PANEL, |
317 LAUNCH_CONTAINER_TAB, | 322 LAUNCH_CONTAINER_TAB, |
318 // For platform apps, which don't actually have a container (they just get a | 323 // For platform apps, which don't actually have a container (they just get a |
319 // "onLaunched" event). | 324 // "onLaunched" event). |
320 LAUNCH_CONTAINER_NONE | 325 LAUNCH_CONTAINER_NONE |
321 }; | 326 }; |
322 | 327 |
323 } // namespace extensions | 328 } // namespace extensions |
324 | 329 |
325 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ | 330 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ |
OLD | NEW |