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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp

Issue 1983753002: Remove OwnPtr::release() calls in core/ (part 2). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2010 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2010 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ 3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/
4 * Copyright (C) 2010 Google Inc. All Rights Reserved. 4 * Copyright (C) 2010 Google Inc. All Rights Reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 215 }
216 216
217 void CSSPreloadScanner::emitRule(const SegmentedString& source) 217 void CSSPreloadScanner::emitRule(const SegmentedString& source)
218 { 218 {
219 if (equalIgnoringCase(m_rule, "import")) { 219 if (equalIgnoringCase(m_rule, "import")) {
220 String url = parseCSSStringOrURL(m_ruleValue.toString()); 220 String url = parseCSSStringOrURL(m_ruleValue.toString());
221 if (!url.isEmpty()) { 221 if (!url.isEmpty()) {
222 TextPosition position = TextPosition(source.currentLine(), source.cu rrentColumn()); 222 TextPosition position = TextPosition(source.currentLine(), source.cu rrentColumn());
223 OwnPtr<PreloadRequest> request = PreloadRequest::create(FetchInitiat orTypeNames::css, position, url, *m_predictedBaseElementURL, Resource::CSSStyleS heet, m_referrerPolicy); 223 OwnPtr<PreloadRequest> request = PreloadRequest::create(FetchInitiat orTypeNames::css, position, url, *m_predictedBaseElementURL, Resource::CSSStyleS heet, m_referrerPolicy);
224 // FIXME: Should this be including the charset in the preload reques t? 224 // FIXME: Should this be including the charset in the preload reques t?
225 m_requests->append(request.release()); 225 m_requests->append(std::move(request));
226 } 226 }
227 m_state = Initial; 227 m_state = Initial;
228 } else if (equalIgnoringCase(m_rule, "charset")) 228 } else if (equalIgnoringCase(m_rule, "charset"))
229 m_state = Initial; 229 m_state = Initial;
230 else 230 else
231 m_state = DoneParsingImportRules; 231 m_state = DoneParsingImportRules;
232 m_rule.clear(); 232 m_rule.clear();
233 m_ruleValue.clear(); 233 m_ruleValue.clear();
234 } 234 }
235 235
236 } // namespace blink 236 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698