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

Side by Side Diff: Source/core/loader/PingLoader.cpp

Issue 1299493003: Attach mixed content status to resource requests when sent to devtools (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: mkwst comments Created 5 years, 4 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 request.setHTTPBody(report); 118 request.setHTTPBody(report);
119 finishPingRequestInitialization(request, frame); 119 finishPingRequestInitialization(request, frame);
120 120
121 FetchInitiatorInfo initiatorInfo; 121 FetchInitiatorInfo initiatorInfo;
122 initiatorInfo.name = FetchInitiatorTypeNames::violationreport; 122 initiatorInfo.name = FetchInitiatorTypeNames::violationreport;
123 PingLoader::start(frame, request, initiatorInfo, SecurityOrigin::create(repo rtURL)->isSameSchemeHostPort(frame->document()->securityOrigin()) ? AllowStoredC redentials : DoNotAllowStoredCredentials); 123 PingLoader::start(frame, request, initiatorInfo, SecurityOrigin::create(repo rtURL)->isSameSchemeHostPort(frame->document()->securityOrigin()) ? AllowStoredC redentials : DoNotAllowStoredCredentials);
124 } 124 }
125 125
126 void PingLoader::start(LocalFrame* frame, ResourceRequest& request, const FetchI nitiatorInfo& initiatorInfo, StoredCredentials credentialsAllowed) 126 void PingLoader::start(LocalFrame* frame, ResourceRequest& request, const FetchI nitiatorInfo& initiatorInfo, StoredCredentials credentialsAllowed)
127 { 127 {
128 if (MixedContentChecker::shouldBlockFetch(frame, request, request.url())) 128 if (MixedContentChecker::shouldBlockFetch(frame, &request, request.url()))
129 return; 129 return;
130 130
131 // Leak the ping loader, since it will kill itself as soon as it receives a response. 131 // Leak the ping loader, since it will kill itself as soon as it receives a response.
132 RefPtrWillBeRawPtr<PingLoader> loader = adoptRefWillBeNoop(new PingLoader(fr ame, request, initiatorInfo, credentialsAllowed)); 132 RefPtrWillBeRawPtr<PingLoader> loader = adoptRefWillBeNoop(new PingLoader(fr ame, request, initiatorInfo, credentialsAllowed));
133 loader->ref(); 133 loader->ref();
134 } 134 }
135 135
136 PingLoader::PingLoader(LocalFrame* frame, ResourceRequest& request, const FetchI nitiatorInfo& initiatorInfo, StoredCredentials credentialsAllowed) 136 PingLoader::PingLoader(LocalFrame* frame, ResourceRequest& request, const FetchI nitiatorInfo& initiatorInfo, StoredCredentials credentialsAllowed)
137 : PageLifecycleObserver(frame->page()) 137 : PageLifecycleObserver(frame->page())
138 , m_timeout(this, &PingLoader::timeout) 138 , m_timeout(this, &PingLoader::timeout)
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 InspectorInstrumentation::didFailLoading(frame, m_identifier, ResourceError: :cancelledError(m_url)); 223 InspectorInstrumentation::didFailLoading(frame, m_identifier, ResourceError: :cancelledError(m_url));
224 frame->console().didFailLoading(m_identifier, ResourceError::cancelledError( m_url)); 224 frame->console().didFailLoading(m_identifier, ResourceError::cancelledError( m_url));
225 } 225 }
226 226
227 DEFINE_TRACE(PingLoader) 227 DEFINE_TRACE(PingLoader)
228 { 228 {
229 PageLifecycleObserver::trace(visitor); 229 PageLifecycleObserver::trace(visitor);
230 } 230 }
231 231
232 } // namespace blink 232 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698