diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-30 21:52:07 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-30 21:52:07 +0000 |
commit | 7715d63a3b9da9c149cdd0f544dbdf4cb13a8ed7 (patch) | |
tree | c018df57b687d9b3a6c8e0d06d297ca2e6d18c30 /chrome/browser | |
parent | f33b82f2e0be4b3c739f3e51f34b680080e0150e (diff) | |
download | chromium_src-7715d63a3b9da9c149cdd0f544dbdf4cb13a8ed7.zip chromium_src-7715d63a3b9da9c149cdd0f544dbdf4cb13a8ed7.tar.gz chromium_src-7715d63a3b9da9c149cdd0f544dbdf4cb13a8ed7.tar.bz2 |
Add a wildcard scheme and a special 'all_urls' pattern to URLPattern.
BUG=47179
Review URL: http://codereview.chromium.org/2884008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51295 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/extensions/crx_installer.cc | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/extensions_ui.cc | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/user_script_master.cc | 2 | ||||
-rw-r--r-- | chrome/browser/resources/calendar_app/manifest.json | 43 | ||||
-rw-r--r-- | chrome/browser/resources/chat_manager/manifest.json | 9 | ||||
-rw-r--r-- | chrome/browser/resources/docs_app/manifest.json | 105 | ||||
-rw-r--r-- | chrome/browser/resources/gmail_app/manifest.json | 47 |
7 files changed, 90 insertions, 120 deletions
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc index 0ebd217..bced865 100644 --- a/chrome/browser/extensions/crx_installer.cc +++ b/chrome/browser/extensions/crx_installer.cc @@ -168,7 +168,7 @@ void CrxInstaller::OnUnpackSuccess(const FilePath& temp_dir, // Require that apps are served from the domain they claim in their extent, // or some ancestor domain. if (extension_->is_app() && limit_web_extent_to_download_host_) { - URLPattern pattern; + URLPattern pattern(URLPattern::SCHEMES_ALL); pattern.set_host(original_url_.host()); pattern.set_match_subdomains(true); diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc index 84a6f33c..c4c55ec 100644 --- a/chrome/browser/extensions/extensions_ui.cc +++ b/chrome/browser/extensions/extensions_ui.cc @@ -791,7 +791,7 @@ static bool ExtensionWantsFileAccess(const Extension* extension) { for (UserScript::PatternList::const_iterator pattern = it->url_patterns().begin(); pattern != it->url_patterns().end(); ++pattern) { - if (pattern->scheme() == chrome::kFileScheme) + if (pattern->MatchesScheme(chrome::kFileScheme)) return true; } } diff --git a/chrome/browser/extensions/user_script_master.cc b/chrome/browser/extensions/user_script_master.cc index c651c2e..2f2ced5 100644 --- a/chrome/browser/extensions/user_script_master.cc +++ b/chrome/browser/extensions/user_script_master.cc @@ -107,7 +107,7 @@ bool UserScriptMaster::ScriptReloader::ParseMetadataHeader( } else if (GetDeclarationValue(line, kDescriptionDeclaration, &value)) { script->set_description(value); } else if (GetDeclarationValue(line, kMatchDeclaration, &value)) { - URLPattern pattern; + URLPattern pattern(UserScript::kValidUserScriptSchemes); if (!pattern.Parse(value)) return false; script->add_url_pattern(pattern); diff --git a/chrome/browser/resources/calendar_app/manifest.json b/chrome/browser/resources/calendar_app/manifest.json index 11ec952..df388fa 100644 --- a/chrome/browser/resources/calendar_app/manifest.json +++ b/chrome/browser/resources/calendar_app/manifest.json @@ -1,22 +1,21 @@ -{
- "key": "XX3fMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCf1MLMJ1mzNVJOVqaFFX+fQ7gJLVeZN+Sq3tKnZM33oWP82xDDs345/TsFTqGV3Nj5KvmjIN5NwcW/AeBOpVeOGFujFDSTOCZv0JDKkTXLyCegSwF+ljBi0TbCrsgv2T+8Jt891+hSyw5LPjXoTX2bKz+bu016tQnGnhb6fXyCBQIDAQAB",
- "name": "Google Calendar",
- "version": "1.3",
- "permissions": [ "notifications" ],
- "icons": {
- "128": "128.png",
- "24": "24.png",
- "32": "32.png",
- "48": "48.png"
- },
- "app": {
- "urls": [
- "http://www.google.com/calendar/",
- "https://www.google.com/calendar/"
- ],
- "launch": {
- "container": "tab",
- "web_url": "https://www.google.com/calendar/"
- }
- }
-}
+{ + "key": "XX3fMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCf1MLMJ1mzNVJOVqaFFX+fQ7gJLVeZN+Sq3tKnZM33oWP82xDDs345/TsFTqGV3Nj5KvmjIN5NwcW/AeBOpVeOGFujFDSTOCZv0JDKkTXLyCegSwF+ljBi0TbCrsgv2T+8Jt891+hSyw5LPjXoTX2bKz+bu016tQnGnhb6fXyCBQIDAQAB", + "name": "Google Calendar", + "version": "1.3", + "permissions": [ "notifications" ], + "icons": { + "128": "128.png", + "24": "24.png", + "32": "32.png", + "48": "48.png" + }, + "app": { + "urls": [ + "*://www.google.com/calendar/" + ], + "launch": { + "container": "tab", + "web_url": "https://www.google.com/calendar/" + } + } +} diff --git a/chrome/browser/resources/chat_manager/manifest.json b/chrome/browser/resources/chat_manager/manifest.json index f107bd5..ea4b743 100644 --- a/chrome/browser/resources/chat_manager/manifest.json +++ b/chrome/browser/resources/chat_manager/manifest.json @@ -16,8 +16,7 @@ "js/chatbridgehook.js" ], "matches": [ - "http://talkgadget.google.com/*", - "https://talkgadget.google.com/*" + "*://talkgadget.google.com/*" ], "run_at": "document_end", "all_frames": true @@ -27,15 +26,13 @@ "js/gmailbridgehook.js" ], "matches": [ - "http://mail.google.com/*", - "https://mail.google.com/*" + "*://mail.google.com/*" ], "run_at": "document_end" }], "permissions": [ "tabs", - "http://talkgadget.google.com/*", - "https://talkgadget.google.com/*" + "*://talkgadget.google.com/*" ], "launch": { "local_path": "central_roster_viewer.html", diff --git a/chrome/browser/resources/docs_app/manifest.json b/chrome/browser/resources/docs_app/manifest.json index d4b56fc4..1df3c5c 100644 --- a/chrome/browser/resources/docs_app/manifest.json +++ b/chrome/browser/resources/docs_app/manifest.json @@ -1,64 +1,41 @@ -{
- "key": "XX1fMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCfjDZDDE/CHFEYjpPSDjdI3zphzGo7fSxO3+/pQs++FwvA+OpKKhmBga2Sa+f53ujDlPR8Q6mCvy1lXM4M4zD4Hg3lH2LC1wT/YXxJ28afRYW1yEo6/pbpHazij3+FneGMT2xcTyGvgoacJHXOTUqWyCN7qMOCiFDwQ6Uk1zJOPQIDAQAB",
- "name": "Google Docs",
- "version": "1",
- "icons": {
- "128": "128.png",
- "24": "24.png",
- "32": "32.png",
- "48": "48.png"
- },
- "app": {
- "urls": [
- "http://www.google.com/docs/",
- "https://www.google.com/docs/",
- "http://docs.google.com/",
- "https://docs.google.com/",
- "http://docs0.google.com/",
- "https://docs0.google.com/",
- "http://docs1.google.com/",
- "https://docs1.google.com/",
- "http://docs2.google.com/",
- "https://docs2.google.com/",
- "http://docs3.google.com/",
- "https://docs3.google.com/",
- "http://docs4.google.com/",
- "https://docs4.google.com/",
- "http://docs5.google.com/",
- "https://docs5.google.com/",
- "http://docs6.google.com/",
- "https://docs6.google.com/",
- "http://docs7.google.com/",
- "https://docs7.google.com/",
- "http://docs8.google.com/",
- "https://docs8.google.com/",
- "http://docs9.google.com/",
- "https://docs9.google.com/",
- "http://spreadsheets.google.com/",
- "https://spreadsheets.google.com/",
- "http://spreadsheets0.google.com/",
- "https://spreadsheets0.google.com/",
- "http://spreadsheets1.google.com/",
- "https://spreadsheets1.google.com/",
- "http://spreadsheets2.google.com/",
- "https://spreadsheets2.google.com/",
- "http://spreadsheets3.google.com/",
- "https://spreadsheets3.google.com/",
- "http://spreadsheets4.google.com/",
- "https://spreadsheets4.google.com/",
- "http://spreadsheets5.google.com/",
- "https://spreadsheets5.google.com/",
- "http://spreadsheets6.google.com/",
- "https://spreadsheets6.google.com/",
- "http://spreadsheets7.google.com/",
- "https://spreadsheets7.google.com/",
- "http://spreadsheets8.google.com/",
- "https://spreadsheets8.google.com/",
- "http://spreadsheets9.google.com/",
- "https://spreadsheets9.google.com/"
- ],
- "launch": {
- "web_url": "https://docs.google.com/"
- }
- }
-}
+{ + "key": "XX1fMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCfjDZDDE/CHFEYjpPSDjdI3zphzGo7fSxO3+/pQs++FwvA+OpKKhmBga2Sa+f53ujDlPR8Q6mCvy1lXM4M4zD4Hg3lH2LC1wT/YXxJ28afRYW1yEo6/pbpHazij3+FneGMT2xcTyGvgoacJHXOTUqWyCN7qMOCiFDwQ6Uk1zJOPQIDAQAB", + "name": "Google Docs", + "version": "1", + "icons": { + "128": "128.png", + "24": "24.png", + "32": "32.png", + "48": "48.png" + }, + "app": { + "urls": [ + "*://www.google.com/docs/", + "*://docs.google.com/", + "*://docs0.google.com/", + "*://docs1.google.com/", + "*://docs2.google.com/", + "*://docs3.google.com/", + "*://docs4.google.com/", + "*://docs5.google.com/", + "*://docs6.google.com/", + "*://docs7.google.com/", + "*://docs8.google.com/", + "*://docs9.google.com/", + "*://spreadsheets.google.com/", + "*://spreadsheets0.google.com/", + "*://spreadsheets1.google.com/", + "*://spreadsheets2.google.com/", + "*://spreadsheets3.google.com/", + "*://spreadsheets4.google.com/", + "*://spreadsheets5.google.com/", + "*://spreadsheets6.google.com/", + "*://spreadsheets7.google.com/", + "*://spreadsheets8.google.com/", + "*://spreadsheets9.google.com/" + ], + "launch": { + "web_url": "https://docs.google.com/" + } + } +} diff --git a/chrome/browser/resources/gmail_app/manifest.json b/chrome/browser/resources/gmail_app/manifest.json index 378a2a9..4a90be2 100644 --- a/chrome/browser/resources/gmail_app/manifest.json +++ b/chrome/browser/resources/gmail_app/manifest.json @@ -1,25 +1,22 @@ -{
- "key": "XX2fMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCfjDZDDE/CHFEYjpPSDjdI3zphzGo7fSxO3+/pQs++FwvA+OpKKhmBga2Sa+f53ujDlPR8Q6mCvy1lXM4M4zD4Hg3lH2LC1wT/YXxJ28afRYW1yEo6/pbpHazij3+FneGMT2xcTyGvgoacJHXOTUqWyCN7qMOCiFDwQ6Uk1zJOPQIDAQAB",
- "name": "Google Mail",
- "version": "1",
- "icons": {
- "128": "128.png",
- "24": "24.png",
- "32": "32.png",
- "48": "48.png"
- },
- "permissions": [ "notifications" ],
- "app": {
- "urls": [
- "http://mail.google.com/mail/",
- "https://mail.google.com/mail/",
- "http://gmail.com/",
- "https://gmail.com/",
- "http://www.gmail.com/",
- "https://www.gmail.com/"
- ],
- "launch": {
- "web_url": "https://mail.google.com/mail/"
- }
- }
-}
+{ + "key": "XX2fMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCfjDZDDE/CHFEYjpPSDjdI3zphzGo7fSxO3+/pQs++FwvA+OpKKhmBga2Sa+f53ujDlPR8Q6mCvy1lXM4M4zD4Hg3lH2LC1wT/YXxJ28afRYW1yEo6/pbpHazij3+FneGMT2xcTyGvgoacJHXOTUqWyCN7qMOCiFDwQ6Uk1zJOPQIDAQAB", + "name": "Google Mail", + "version": "1", + "icons": { + "128": "128.png", + "24": "24.png", + "32": "32.png", + "48": "48.png" + }, + "permissions": [ "notifications" ], + "app": { + "urls": [ + "*://mail.google.com/mail/", + "*://gmail.com/", + "*://www.gmail.com/" + ], + "launch": { + "web_url": "https://mail.google.com/mail/" + } + } +} |