Index: content/renderer/savable_resources.cc |
diff --git a/content/renderer/savable_resources.cc b/content/renderer/savable_resources.cc |
index c1a702bd0fc5909b9bb4f46897c92e5b83a239d6..cb21161472ae07c949dcd4ab368624cf360a23ba 100644 |
--- a/content/renderer/savable_resources.cc |
+++ b/content/renderer/savable_resources.cc |
@@ -9,6 +9,7 @@ |
#include "base/compiler_specific.h" |
#include "base/logging.h" |
#include "base/strings/string_util.h" |
+#include "content/public/common/url_utils.h" |
#include "content/renderer/web_frame_utils.h" |
#include "third_party/WebKit/public/platform/WebString.h" |
#include "third_party/WebKit/public/platform/WebVector.h" |
@@ -96,8 +97,7 @@ void GetSavableResourceLinkForElement( |
} // namespace |
bool GetSavableResourceLinksForFrame(WebFrame* current_frame, |
- SavableResourcesResult* result, |
- const char** savable_schemes) { |
+ SavableResourcesResult* result) { |
// Get current frame's URL. |
GURL current_frame_url = current_frame->document().url(); |
@@ -106,14 +106,7 @@ bool GetSavableResourceLinksForFrame(WebFrame* current_frame, |
return false; |
// If url of current frame is not a savable protocol, ignore it. |
- bool is_valid_protocol = false; |
- for (int i = 0; savable_schemes[i] != NULL; ++i) { |
- if (current_frame_url.SchemeIs(savable_schemes[i])) { |
- is_valid_protocol = true; |
- break; |
- } |
- } |
- if (!is_valid_protocol) |
+ if (!IsSavableURL(current_frame_url)) |
return false; |
// Get current using document. |