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

Side by Side Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 99333011: Make sure getAttribute() / setAttribute() callers use AtomicStrings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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 | « Source/core/editing/markup.cpp ('k') | Source/core/html/HTMLAnchorElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 if (!cachedResource(preload.m_request.resourceRequest().url())) 1070 if (!cachedResource(preload.m_request.resourceRequest().url()))
1071 requestPreload(preload.m_type, preload.m_request, preload.m_charset) ; 1071 requestPreload(preload.m_type, preload.m_request, preload.m_charset) ;
1072 } 1072 }
1073 m_pendingPreloads.clear(); 1073 m_pendingPreloads.clear();
1074 } 1074 }
1075 1075
1076 void ResourceFetcher::requestPreload(Resource::Type type, FetchRequest& request, const String& charset) 1076 void ResourceFetcher::requestPreload(Resource::Type type, FetchRequest& request, const String& charset)
1077 { 1077 {
1078 String encoding; 1078 String encoding;
1079 if (type == Resource::Script || type == Resource::CSSStyleSheet) 1079 if (type == Resource::Script || type == Resource::CSSStyleSheet)
1080 encoding = charset.isEmpty() ? m_document->charset() : charset; 1080 encoding = charset.isEmpty() ? m_document->charset().string() : charset;
1081 1081
1082 request.setCharset(encoding); 1082 request.setCharset(encoding);
1083 request.setForPreload(true); 1083 request.setForPreload(true);
1084 1084
1085 ResourcePtr<Resource> resource = requestResource(type, request); 1085 ResourcePtr<Resource> resource = requestResource(type, request);
1086 if (!resource || (m_preloads && m_preloads->contains(resource.get()))) 1086 if (!resource || (m_preloads && m_preloads->contains(resource.get())))
1087 return; 1087 return;
1088 TRACE_EVENT_ASYNC_STEP_INTO0("net", "Resource", resource.get(), "Preload"); 1088 TRACE_EVENT_ASYNC_STEP_INTO0("net", "Resource", resource.get(), "Preload");
1089 resource->increasePreloadCount(); 1089 resource->increasePreloadCount();
1090 1090
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 } 1333 }
1334 #endif 1334 #endif
1335 1335
1336 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions() 1336 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions()
1337 { 1337 {
1338 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SendCallbacks, SniffCon tent, BufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientF orCrossOriginCredentials, DoSecurityCheck, CheckContentSecurityPolicy, DocumentC ontext)); 1338 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SendCallbacks, SniffCon tent, BufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientF orCrossOriginCredentials, DoSecurityCheck, CheckContentSecurityPolicy, DocumentC ontext));
1339 return options; 1339 return options;
1340 } 1340 }
1341 1341
1342 } 1342 }
OLDNEW
« no previous file with comments | « Source/core/editing/markup.cpp ('k') | Source/core/html/HTMLAnchorElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698