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

Side by Side Diff: Source/core/inspector/InspectorResourceAgent.cpp

Issue 174523002: Reland "Move MemoryCache implementation details out of Resource" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
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 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 void InspectorResourceAgent::clearBrowserCookies(ErrorString*) 709 void InspectorResourceAgent::clearBrowserCookies(ErrorString*)
710 { 710 {
711 m_client->clearBrowserCookies(); 711 m_client->clearBrowserCookies();
712 } 712 }
713 713
714 void InspectorResourceAgent::setCacheDisabled(ErrorString*, bool cacheDisabled) 714 void InspectorResourceAgent::setCacheDisabled(ErrorString*, bool cacheDisabled)
715 { 715 {
716 m_state->setBoolean(ResourceAgentState::cacheDisabled, cacheDisabled); 716 m_state->setBoolean(ResourceAgentState::cacheDisabled, cacheDisabled);
717 if (cacheDisabled) 717 if (cacheDisabled)
718 memoryCache()->evictResources(); 718 memoryCache()->evictResources();
719 for (Frame* frame = m_pageAgent->mainFrame(); frame; frame = frame->tree().t raverseNext())
720 frame->document()->fetcher()->garbageCollectDocumentResources();
719 } 721 }
720 722
721 void InspectorResourceAgent::loadResourceForFrontend(ErrorString* errorString, c onst String& frameId, const String& url, const RefPtr<JSONObject>* requestHeader s, PassRefPtr<LoadResourceForFrontendCallback> prpCallback) 723 void InspectorResourceAgent::loadResourceForFrontend(ErrorString* errorString, c onst String& frameId, const String& url, const RefPtr<JSONObject>* requestHeader s, PassRefPtr<LoadResourceForFrontendCallback> prpCallback)
722 { 724 {
723 RefPtr<LoadResourceForFrontendCallback> callback = prpCallback; 725 RefPtr<LoadResourceForFrontendCallback> callback = prpCallback;
724 Frame* frame = m_pageAgent->assertFrame(errorString, frameId); 726 Frame* frame = m_pageAgent->assertFrame(errorString, frameId);
725 if (!frame) 727 if (!frame)
726 return; 728 return;
727 729
728 Document* document = frame->document(); 730 Document* document = frame->document();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 : InspectorBaseAgent<InspectorResourceAgent>("Network") 811 : InspectorBaseAgent<InspectorResourceAgent>("Network")
810 , m_pageAgent(pageAgent) 812 , m_pageAgent(pageAgent)
811 , m_client(client) 813 , m_client(client)
812 , m_frontend(0) 814 , m_frontend(0)
813 , m_resourcesData(adoptPtr(new NetworkResourcesData())) 815 , m_resourcesData(adoptPtr(new NetworkResourcesData()))
814 , m_isRecalculatingStyle(false) 816 , m_isRecalculatingStyle(false)
815 { 817 {
816 } 818 }
817 819
818 } // namespace WebCore 820 } // namespace WebCore
OLDNEW
« Source/core/fetch/Resource.cpp ('K') | « Source/core/frame/ImageBitmapTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698