Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chrome_extensions_client.h" | 5 #include "chrome/common/extensions/chrome_extensions_client.h" |
| 6 | 6 |
| 7 #include "apps/common/api/generated_schemas.h" | 7 #include "apps/common/api/generated_schemas.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "chrome/common/extensions/api/generated_schemas.h" | 9 #include "chrome/common/extensions/api/generated_schemas.h" |
| 10 #include "chrome/common/extensions/chrome_manifest_handlers.h" | 10 #include "chrome/common/extensions/chrome_manifest_handlers.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 91 // Filters out every URL pattern that matches chrome:// scheme. | 91 // Filters out every URL pattern that matches chrome:// scheme. |
| 92 if (i->scheme() == content::kChromeUIScheme) { | 92 if (i->scheme() == content::kChromeUIScheme) { |
| 93 // chrome://favicon is the only URL for chrome:// scheme that we | 93 // chrome://favicon is the only URL for chrome:// scheme that we |
| 94 // want to support. We want to deprecate the "chrome" scheme. | 94 // want to support. We want to deprecate the "chrome" scheme. |
| 95 // We should not add any additional "host" here. | 95 // We should not add any additional "host" here. |
| 96 if (GURL(chrome::kChromeUIFaviconURL).host() != i->host()) | 96 if (GURL(chrome::kChromeUIFaviconURL).host() != i->host()) |
| 97 continue; | 97 continue; |
| 98 messages->insert(PermissionMessage( | 98 messages->insert(PermissionMessage( |
| 99 PermissionMessage::kFavicon, | 99 PermissionMessage::kFavicon, |
| 100 l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WARNING_FAVICON))); | 100 l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WARNING_FAVICON))); |
| 101 } else { | 101 } else if (i->scheme() != content::kAboutScheme) { |
| 102 // Don't warn about the about: scheme, because extensions cannot script | |
|
not at google - send to devlin
2014/04/10 21:12:49
can we only support about:blank?
| |
| 103 // these pages unless they have the permission to edit the frame's origin. | |
|
not at google - send to devlin
2014/04/18 16:04:55
@jschuh is the origin of a top-level about:blank "
| |
| 102 new_hosts->AddPattern(*i); | 104 new_hosts->AddPattern(*i); |
| 103 } | 105 } |
| 104 } | 106 } |
| 105 } | 107 } |
| 106 | 108 |
| 107 void ChromeExtensionsClient::SetScriptingWhitelist( | 109 void ChromeExtensionsClient::SetScriptingWhitelist( |
| 108 const ExtensionsClient::ScriptingWhitelist& whitelist) { | 110 const ExtensionsClient::ScriptingWhitelist& whitelist) { |
| 109 scripting_whitelist_ = whitelist; | 111 scripting_whitelist_ = whitelist; |
| 110 } | 112 } |
| 111 | 113 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 feature->AddFilter( | 181 feature->AddFilter( |
| 180 scoped_ptr<SimpleFeatureFilter>(new ChromeChannelFeatureFilter(feature))); | 182 scoped_ptr<SimpleFeatureFilter>(new ChromeChannelFeatureFilter(feature))); |
| 181 } | 183 } |
| 182 | 184 |
| 183 // static | 185 // static |
| 184 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { | 186 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { |
| 185 return g_client.Pointer(); | 187 return g_client.Pointer(); |
| 186 } | 188 } |
| 187 | 189 |
| 188 } // namespace extensions | 190 } // namespace extensions |
| OLD | NEW |