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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp

Issue 2642383003: Replace Resource::Status with ResourceStatus (Closed)
Patch Set: Rebase. Created 3 years, 10 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 std::unique_ptr<protocol::Page::FrameResource> resourceObject = 773 std::unique_ptr<protocol::Page::FrameResource> resourceObject =
774 protocol::Page::FrameResource::create() 774 protocol::Page::FrameResource::create()
775 .setUrl(urlWithoutFragment(cachedResource->url()).getString()) 775 .setUrl(urlWithoutFragment(cachedResource->url()).getString())
776 .setType(cachedResourceTypeJson(*cachedResource)) 776 .setType(cachedResourceTypeJson(*cachedResource))
777 .setMimeType(cachedResource->response().mimeType()) 777 .setMimeType(cachedResource->response().mimeType())
778 .setLastModified(cachedResource->response().lastModified()) 778 .setLastModified(cachedResource->response().lastModified())
779 .setContentSize(cachedResource->response().decodedBodyLength()) 779 .setContentSize(cachedResource->response().decodedBodyLength())
780 .build(); 780 .build();
781 if (cachedResource->wasCanceled()) 781 if (cachedResource->wasCanceled())
782 resourceObject->setCanceled(true); 782 resourceObject->setCanceled(true);
783 else if (cachedResource->getStatus() == Resource::LoadError) 783 else if (cachedResource->getStatus() == ResourceStatus::LoadError)
784 resourceObject->setFailed(true); 784 resourceObject->setFailed(true);
785 subresources->addItem(std::move(resourceObject)); 785 subresources->addItem(std::move(resourceObject));
786 } 786 }
787 787
788 HeapVector<Member<Document>> allImports = 788 HeapVector<Member<Document>> allImports =
789 InspectorPageAgent::importsForFrame(frame); 789 InspectorPageAgent::importsForFrame(frame);
790 for (Document* import : allImports) { 790 for (Document* import : allImports) {
791 std::unique_ptr<protocol::Page::FrameResource> resourceObject = 791 std::unique_ptr<protocol::Page::FrameResource> resourceObject =
792 protocol::Page::FrameResource::create() 792 protocol::Page::FrameResource::create()
793 .setUrl(urlWithoutFragment(import->url()).getString()) 793 .setUrl(urlWithoutFragment(import->url()).getString())
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 return Response::OK(); 881 return Response::OK();
882 } 882 }
883 883
884 DEFINE_TRACE(InspectorPageAgent) { 884 DEFINE_TRACE(InspectorPageAgent) {
885 visitor->trace(m_inspectedFrames); 885 visitor->trace(m_inspectedFrames);
886 visitor->trace(m_inspectorResourceContentLoader); 886 visitor->trace(m_inspectorResourceContentLoader);
887 InspectorBaseAgent::trace(visitor); 887 InspectorBaseAgent::trace(visitor);
888 } 888 }
889 889
890 } // namespace blink 890 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698