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

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 2727633006: DevTools: Rename InspectorInstrumentation:: namespace into probe:: (Closed)
Patch Set: Created 3 years, 9 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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 285
286 if (!m_mainResource->errorOccurred() && !m_mainResource->wasCanceled()) { 286 if (!m_mainResource->errorOccurred() && !m_mainResource->wasCanceled()) {
287 finishedLoading(m_mainResource->loadFinishTime()); 287 finishedLoading(m_mainResource->loadFinishTime());
288 return; 288 return;
289 } 289 }
290 290
291 if (m_applicationCacheHost) 291 if (m_applicationCacheHost)
292 m_applicationCacheHost->failedLoadingMainResource(); 292 m_applicationCacheHost->failedLoadingMainResource();
293 293
294 if (m_mainResource->resourceError().wasBlockedByResponse()) { 294 if (m_mainResource->resourceError().wasBlockedByResponse()) {
295 InspectorInstrumentation::canceledAfterReceivedResourceResponse( 295 probe::canceledAfterReceivedResourceResponse(
296 m_frame, this, mainResourceIdentifier(), resource->response(), 296 m_frame, this, mainResourceIdentifier(), resource->response(),
297 m_mainResource.get()); 297 m_mainResource.get());
298 } 298 }
299 299
300 frameLoader().loadFailed(this, m_mainResource->resourceError()); 300 frameLoader().loadFailed(this, m_mainResource->resourceError());
301 clearMainResourceHandle(); 301 clearMainResourceHandle();
302 } 302 }
303 303
304 void DocumentLoader::finishedLoading(double finishTime) { 304 void DocumentLoader::finishedLoading(double finishTime) {
305 DCHECK(m_frame->loader().stateMachine()->creatingInitialEmptyDocument() || 305 DCHECK(m_frame->loader().stateMachine()->creatingInitialEmptyDocument() ||
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 return false; 413 return false;
414 } 414 }
415 415
416 if (!canShowMIMEType(m_response.mimeType(), m_frame)) 416 if (!canShowMIMEType(m_response.mimeType(), m_frame))
417 return false; 417 return false;
418 return true; 418 return true;
419 } 419 }
420 420
421 void DocumentLoader::cancelLoadAfterCSPDenied( 421 void DocumentLoader::cancelLoadAfterCSPDenied(
422 const ResourceResponse& response) { 422 const ResourceResponse& response) {
423 InspectorInstrumentation::canceledAfterReceivedResourceResponse( 423 probe::canceledAfterReceivedResourceResponse(
424 m_frame, this, mainResourceIdentifier(), response, m_mainResource.get()); 424 m_frame, this, mainResourceIdentifier(), response, m_mainResource.get());
425 425
426 setWasBlockedAfterCSP(); 426 setWasBlockedAfterCSP();
427 427
428 // Pretend that this was an empty HTTP 200 response. Don't reuse the original 428 // Pretend that this was an empty HTTP 200 response. Don't reuse the original
429 // URL for the empty page (https://crbug.com/622385). 429 // URL for the empty page (https://crbug.com/622385).
430 // 430 //
431 // TODO(mkwst): Remove this once XFO moves to the browser. 431 // TODO(mkwst): Remove this once XFO moves to the browser.
432 // https://crbug.com/555418. 432 // https://crbug.com/555418.
433 clearMainResourceHandle(); 433 clearMainResourceHandle();
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 503
504 if (response.didServiceWorkerNavigationPreload()) 504 if (response.didServiceWorkerNavigationPreload())
505 UseCounter::count(m_frame, UseCounter::ServiceWorkerNavigationPreload); 505 UseCounter::count(m_frame, UseCounter::ServiceWorkerNavigationPreload);
506 m_response = response; 506 m_response = response;
507 507
508 if (isArchiveMIMEType(m_response.mimeType()) && 508 if (isArchiveMIMEType(m_response.mimeType()) &&
509 m_mainResource->getDataBufferingPolicy() != BufferData) 509 m_mainResource->getDataBufferingPolicy() != BufferData)
510 m_mainResource->setDataBufferingPolicy(BufferData); 510 m_mainResource->setDataBufferingPolicy(BufferData);
511 511
512 if (!shouldContinueForResponse()) { 512 if (!shouldContinueForResponse()) {
513 InspectorInstrumentation::continueWithPolicyIgnore( 513 probe::continueWithPolicyIgnore(m_frame, this, m_mainResource->identifier(),
514 m_frame, this, m_mainResource->identifier(), m_response, 514 m_response, m_mainResource.get());
515 m_mainResource.get());
516 m_fetcher->stopFetching(); 515 m_fetcher->stopFetching();
517 return; 516 return;
518 } 517 }
519 518
520 if (m_frame->owner() && m_response.isHTTP() && 519 if (m_frame->owner() && m_response.isHTTP() &&
521 !FetchUtils::isOkStatus(m_response.httpStatusCode())) 520 !FetchUtils::isOkStatus(m_response.httpStatusCode()))
522 m_frame->owner()->renderFallbackContent(); 521 m_frame->owner()->renderFallbackContent();
523 } 522 }
524 523
525 void DocumentLoader::ensureWriter(const AtomicString& mimeType, 524 void DocumentLoader::ensureWriter(const AtomicString& mimeType,
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 m_writer ? m_writer->encoding() : emptyAtom, true, 811 m_writer ? m_writer->encoding() : emptyAtom, true,
813 ForceSynchronousParsing); 812 ForceSynchronousParsing);
814 if (!source.isNull()) 813 if (!source.isNull())
815 m_writer->appendReplacingData(source); 814 m_writer->appendReplacingData(source);
816 endWriting(); 815 endWriting();
817 } 816 }
818 817
819 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 818 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
820 819
821 } // namespace blink 820 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698