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

Side by Side Diff: content/renderer/savable_resources.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 years, 5 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
« no previous file with comments | « content/public/test/test_launcher.cc ('k') | extensions/browser/api/cast_channel/logger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/savable_resources.h" 5 #include "content/renderer/savable_resources.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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // See bug: http://b/issue?id=1111667. 173 // See bug: http://b/issue?id=1111667.
174 attribute_name = "href"; 174 attribute_name = "href";
175 } 175 }
176 } 176 }
177 if (!attribute_name) 177 if (!attribute_name)
178 return WebString(); 178 return WebString();
179 WebString value = element.getAttribute(WebString::fromUTF8(attribute_name)); 179 WebString value = element.getAttribute(WebString::fromUTF8(attribute_name));
180 // If value has content and not start with "javascript:" then return it, 180 // If value has content and not start with "javascript:" then return it,
181 // otherwise return NULL. 181 // otherwise return NULL.
182 if (!value.isNull() && !value.isEmpty() && 182 if (!value.isNull() && !value.isEmpty() &&
183 !base::StartsWithASCII(value.utf8(), "javascript:", false)) 183 !base::StartsWith(value.utf8(), "javascript:",
184 base::CompareCase::INSENSITIVE_ASCII))
184 return value; 185 return value;
185 186
186 return WebString(); 187 return WebString();
187 } 188 }
188 189
189 // Get all savable resource links from current webview, include main 190 // Get all savable resource links from current webview, include main
190 // frame and sub-frame 191 // frame and sub-frame
191 bool GetAllSavableResourceLinksForCurrentPage(WebView* view, 192 bool GetAllSavableResourceLinksForCurrentPage(WebView* view,
192 const GURL& page_url, SavableResourcesResult* result, 193 const GURL& page_url, SavableResourcesResult* result,
193 const char** savable_schemes) { 194 const char** savable_schemes) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 it != frames_set.end(); ++it) { 228 it != frames_set.end(); ++it) {
228 // Append unique frame source to savable frame list. 229 // Append unique frame source to savable frame list.
229 if (resources_set.find(*it) == resources_set.end()) 230 if (resources_set.find(*it) == resources_set.end())
230 result->frames_list->push_back(*it); 231 result->frames_list->push_back(*it);
231 } 232 }
232 233
233 return true; 234 return true;
234 } 235 }
235 236
236 } // namespace content 237 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_launcher.cc ('k') | extensions/browser/api/cast_channel/logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698