Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Side by Side Diff: webkit/glue/dom_operations.cc

Issue 10387090: Pass the referrer policy with the referrer for the save package code path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698