Index: extensions/common/constants.h |
diff --git a/extensions/common/constants.h b/extensions/common/constants.h |
index 492ddbc27b44dc5af8c9df3a9d117115ab08fa18..acc7c6fc08c2bddb64ae8ebf95da36360441d1ef 100644 |
--- a/extensions/common/constants.h |
+++ b/extensions/common/constants.h |
@@ -6,6 +6,7 @@ |
#define EXTENSIONS_COMMON_CONSTANTS_H_ |
#include "base/files/file_path.h" |
+#include "base/strings/string16.h" |
namespace extensions { |
@@ -52,6 +53,12 @@ extern const base::FilePath::CharType kExtensionFileExtension[]; |
// The file extension (.pem) for private key files. |
extern const base::FilePath::CharType kExtensionKeyFileExtension[]; |
+// Determine whether or not a source came from an extension. |source| can link |
+// to a page or a script, and can be external (e.g., "http://www.google.com"), |
+// extension-related (e.g., "chrome-extension://<extension_id>/background.js"), |
+// or internal (e.g., "event_bindings" or "schemaUtils"). |
+bool IsSourceFromAnExtension(const base::string16& source); |
Devlin
2013/08/23 19:47:07
Is there a better place for this?
Yoyo Zhou
2013/08/23 22:54:54
I'd start a new file, extension_urls.h.
Devlin
2013/08/23 23:44:30
Done. I'll try to move some stuff that makes sense
|
+ |
} // namespace extensions |
#endif // EXTENSIONS_COMMON_CONSTANTS_H_ |