| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/glue/dom_operations.h" | 5 #include "webkit/glue/dom_operations.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // Ignore those URLs which are not standard protocols. Because FTP | 91 // Ignore those URLs which are not standard protocols. Because FTP |
| 92 // protocol does no have cache mechanism, we will skip all | 92 // protocol does no have cache mechanism, we will skip all |
| 93 // sub-resources if they use FTP protocol. | 93 // sub-resources if they use FTP protocol. |
| 94 if (!u.SchemeIs("http") && !u.SchemeIs("https") && !u.SchemeIs("file")) | 94 if (!u.SchemeIs("http") && !u.SchemeIs("https") && !u.SchemeIs("file")) |
| 95 return; | 95 return; |
| 96 // Ignore duplicated resource link. | 96 // Ignore duplicated resource link. |
| 97 if (!unique_check->resources_set->insert(u).second) | 97 if (!unique_check->resources_set->insert(u).second) |
| 98 return; | 98 return; |
| 99 result->resources_list->push_back(u); | 99 result->resources_list->push_back(u); |
| 100 // Insert referrer for above new resource link. | 100 // Insert referrer for above new resource link. |
| 101 result->referrers_list->push_back(GURL()); | 101 result->referrer_urls_list->push_back(GURL()); |
| 102 result->referrer_policies_list->push_back(WebKit::WebReferrerPolicyDefault); |
| 102 } | 103 } |
| 103 | 104 |
| 104 // Get all savable resource links from current WebFrameImpl object pointer. | 105 // Get all savable resource links from current WebFrameImpl object pointer. |
| 105 void GetAllSavableResourceLinksForFrame(WebFrame* current_frame, | 106 void GetAllSavableResourceLinksForFrame(WebFrame* current_frame, |
| 106 SavableResourcesUniqueCheck* unique_check, | 107 SavableResourcesUniqueCheck* unique_check, |
| 107 webkit_glue::SavableResourcesResult* result, | 108 webkit_glue::SavableResourcesResult* result, |
| 108 const char** savable_schemes) { | 109 const char** savable_schemes) { |
| 109 // Get current frame's URL. | 110 // Get current frame's URL. |
| 110 GURL current_frame_url = current_frame->document().url(); | 111 GURL current_frame_url = current_frame->document().url(); |
| 111 | 112 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 if (!element.hasTagName("meta")) | 328 if (!element.hasTagName("meta")) |
| 328 continue; | 329 continue; |
| 329 WebString value = element.getAttribute(attribute_name); | 330 WebString value = element.getAttribute(attribute_name); |
| 330 if (value.isNull() || value != attribute_value) | 331 if (value.isNull() || value != attribute_value) |
| 331 continue; | 332 continue; |
| 332 meta_elements->push_back(element); | 333 meta_elements->push_back(element); |
| 333 } | 334 } |
| 334 } | 335 } |
| 335 | 336 |
| 336 } // webkit_glue | 337 } // webkit_glue |
| OLD | NEW |