Index: extensions/common/extension_urls.cc |
diff --git a/chrome/renderer/extensions/native_handler.cc b/extensions/common/extension_urls.cc |
similarity index 50% |
copy from chrome/renderer/extensions/native_handler.cc |
copy to extensions/common/extension_urls.cc |
index d6a9e57cd5518fd35bfbf2e3cc682ab2a3949611..f354b6bbe53a86dbd5b0c9d0db759372b2fe5b53 100644 |
--- a/chrome/renderer/extensions/native_handler.cc |
+++ b/extensions/common/extension_urls.cc |
@@ -2,16 +2,15 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/renderer/extensions/native_handler.h" |
+#include "extensions/common/extension_urls.h" |
-namespace extensions { |
- |
-NativeHandler::NativeHandler() : is_valid_(true) {} |
+#include "extensions/common/constants.h" |
+#include "url/gurl.h" |
-NativeHandler::~NativeHandler() {} |
+namespace extensions { |
-void NativeHandler::Invalidate() { |
- is_valid_ = false; |
+bool IsSourceFromAnExtension(const base::string16& source) { |
+ return GURL(source).SchemeIs(kExtensionScheme); |
} |
} // namespace extensions |