Index: chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc |
diff --git a/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc b/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc |
index 37764cb0064a8f70f43de14d1849aebcb8ec84b3..63565374839b9084a4a235e94f4923bee341e59f 100644 |
--- a/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc |
+++ b/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc |
@@ -37,17 +37,8 @@ FrameNavigationState::FrameNavigationState() { |
FrameNavigationState::~FrameNavigationState() {} |
-bool FrameNavigationState::CanSendEvents( |
- content::RenderFrameHost* frame_host) const { |
- FrameHostToStateMap::const_iterator it = |
- frame_host_state_map_.find(frame_host); |
- if (it == frame_host_state_map_.end() || it->second.error_occurred) { |
- return false; |
- } |
- return IsValidUrl(it->second.url); |
-} |
- |
-bool FrameNavigationState::IsValidUrl(const GURL& url) const { |
+// static |
+bool FrameNavigationState::IsValidUrl(const GURL& url) { |
for (unsigned i = 0; i < arraysize(kValidSchemes); ++i) { |
if (url.scheme() == kValidSchemes[i]) |
return true; |
@@ -60,6 +51,16 @@ bool FrameNavigationState::IsValidUrl(const GURL& url) const { |
return allow_extension_scheme_ && url.scheme() == kExtensionScheme; |
} |
+bool FrameNavigationState::CanSendEvents( |
+ content::RenderFrameHost* frame_host) const { |
+ FrameHostToStateMap::const_iterator it = |
+ frame_host_state_map_.find(frame_host); |
+ if (it == frame_host_state_map_.end() || it->second.error_occurred) { |
+ return false; |
+ } |
+ return IsValidUrl(it->second.url); |
+} |
+ |
void FrameNavigationState::StartTrackingNavigation( |
content::RenderFrameHost* frame_host, |
const GURL& url, |