OLD | NEW |
| 1 // TODO(sqs): add httpsv? |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 4 // found in the LICENSE file. |
4 | 5 |
5 #include "chrome/common/extensions/extension.h" | 6 #include "chrome/common/extensions/extension.h" |
6 | 7 |
7 #include <algorithm> | 8 #include <algorithm> |
8 | 9 |
9 #include "base/base64.h" | 10 #include "base/base64.h" |
10 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 Extension::kUnlimitedStoragePermission, | 245 Extension::kUnlimitedStoragePermission, |
245 Extension::kWebstorePrivatePermission, | 246 Extension::kWebstorePrivatePermission, |
246 }; | 247 }; |
247 const size_t Extension::kNumHostedAppPermissions = | 248 const size_t Extension::kNumHostedAppPermissions = |
248 arraysize(Extension::kHostedAppPermissionNames); | 249 arraysize(Extension::kHostedAppPermissionNames); |
249 | 250 |
250 // We purposefully don't put this into kPermissionNames. | 251 // We purposefully don't put this into kPermissionNames. |
251 const char Extension::kOldUnlimitedStoragePermission[] = "unlimited_storage"; | 252 const char Extension::kOldUnlimitedStoragePermission[] = "unlimited_storage"; |
252 | 253 |
253 const int Extension::kValidWebExtentSchemes = | 254 const int Extension::kValidWebExtentSchemes = |
254 URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS; | 255 URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS | |
| 256 URLPattern::SCHEME_HTTPSV; |
255 | 257 |
256 const int Extension::kValidHostPermissionSchemes = | 258 const int Extension::kValidHostPermissionSchemes = |
257 (UserScript::kValidUserScriptSchemes | | 259 (UserScript::kValidUserScriptSchemes | |
258 URLPattern::SCHEME_CHROMEUI) & ~URLPattern::SCHEME_FILE; | 260 URLPattern::SCHEME_CHROMEUI) & ~URLPattern::SCHEME_FILE; |
259 | 261 |
260 // | 262 // |
261 // Extension | 263 // Extension |
262 // | 264 // |
263 | 265 |
264 // static | 266 // static |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 | 991 |
990 // In order for the --apps-gallery-url switch to work with the gallery | 992 // In order for the --apps-gallery-url switch to work with the gallery |
991 // process isolation, we must insert any provided value into the component | 993 // process isolation, we must insert any provided value into the component |
992 // app's launch url and web extent. | 994 // app's launch url and web extent. |
993 if (id() == extension_misc::kWebStoreAppId) { | 995 if (id() == extension_misc::kWebStoreAppId) { |
994 GURL gallery_url(CommandLine::ForCurrentProcess()-> | 996 GURL gallery_url(CommandLine::ForCurrentProcess()-> |
995 GetSwitchValueASCII(switches::kAppsGalleryURL)); | 997 GetSwitchValueASCII(switches::kAppsGalleryURL)); |
996 if (gallery_url.is_valid()) { | 998 if (gallery_url.is_valid()) { |
997 launch_web_url_ = gallery_url.spec(); | 999 launch_web_url_ = gallery_url.spec(); |
998 | 1000 |
999 URLPattern pattern(URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS); | 1001 URLPattern pattern(URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS | |
| 1002 URLPattern::SCHEME_HTTPSV); |
1000 pattern.Parse(gallery_url.spec()); | 1003 pattern.Parse(gallery_url.spec()); |
1001 pattern.set_path(pattern.path() + '*'); | 1004 pattern.set_path(pattern.path() + '*'); |
1002 extent_.AddPattern(pattern); | 1005 extent_.AddPattern(pattern); |
1003 } | 1006 } |
1004 } | 1007 } |
1005 | 1008 |
1006 return true; | 1009 return true; |
1007 } | 1010 } |
1008 | 1011 |
1009 bool Extension::LoadLaunchContainer(const DictionaryValue* manifest, | 1012 bool Extension::LoadLaunchContainer(const DictionaryValue* manifest, |
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2382 | 2385 |
2383 UninstalledExtensionInfo::~UninstalledExtensionInfo() {} | 2386 UninstalledExtensionInfo::~UninstalledExtensionInfo() {} |
2384 | 2387 |
2385 | 2388 |
2386 UnloadedExtensionInfo::UnloadedExtensionInfo( | 2389 UnloadedExtensionInfo::UnloadedExtensionInfo( |
2387 const Extension* extension, | 2390 const Extension* extension, |
2388 Reason reason) | 2391 Reason reason) |
2389 : reason(reason), | 2392 : reason(reason), |
2390 already_disabled(false), | 2393 already_disabled(false), |
2391 extension(extension) {} | 2394 extension(extension) {} |
OLD | NEW |