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

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: Rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/ImageBitmapTest.cpp ('k') | no next file » | 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) 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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 void InspectorResourceAgent::clearBrowserCookies(ErrorString*) 708 void InspectorResourceAgent::clearBrowserCookies(ErrorString*)
709 { 709 {
710 m_client->clearBrowserCookies(); 710 m_client->clearBrowserCookies();
711 } 711 }
712 712
713 void InspectorResourceAgent::setCacheDisabled(ErrorString*, bool cacheDisabled) 713 void InspectorResourceAgent::setCacheDisabled(ErrorString*, bool cacheDisabled)
714 { 714 {
715 m_state->setBoolean(ResourceAgentState::cacheDisabled, cacheDisabled); 715 m_state->setBoolean(ResourceAgentState::cacheDisabled, cacheDisabled);
716 if (cacheDisabled) 716 if (cacheDisabled)
717 memoryCache()->evictResources(); 717 memoryCache()->evictResources();
718 for (LocalFrame* frame = m_pageAgent->mainFrame(); frame; frame = frame->tre e().traverseNext())
719 frame->document()->fetcher()->garbageCollectDocumentResources();
718 } 720 }
719 721
720 void InspectorResourceAgent::loadResourceForFrontend(ErrorString* errorString, c onst String& frameId, const String& url, const RefPtr<JSONObject>* requestHeader s, PassRefPtr<LoadResourceForFrontendCallback> prpCallback) 722 void InspectorResourceAgent::loadResourceForFrontend(ErrorString* errorString, c onst String& frameId, const String& url, const RefPtr<JSONObject>* requestHeader s, PassRefPtr<LoadResourceForFrontendCallback> prpCallback)
721 { 723 {
722 RefPtr<LoadResourceForFrontendCallback> callback = prpCallback; 724 RefPtr<LoadResourceForFrontendCallback> callback = prpCallback;
723 LocalFrame* frame = m_pageAgent->assertFrame(errorString, frameId); 725 LocalFrame* frame = m_pageAgent->assertFrame(errorString, frameId);
724 if (!frame) 726 if (!frame)
725 return; 727 return;
726 728
727 Document* document = frame->document(); 729 Document* document = frame->document();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 : InspectorBaseAgent<InspectorResourceAgent>("Network") 810 : InspectorBaseAgent<InspectorResourceAgent>("Network")
809 , m_pageAgent(pageAgent) 811 , m_pageAgent(pageAgent)
810 , m_client(client) 812 , m_client(client)
811 , m_frontend(0) 813 , m_frontend(0)
812 , m_resourcesData(adoptPtr(new NetworkResourcesData())) 814 , m_resourcesData(adoptPtr(new NetworkResourcesData()))
813 , m_isRecalculatingStyle(false) 815 , m_isRecalculatingStyle(false)
814 { 816 {
815 } 817 }
816 818
817 } // namespace WebCore 819 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/ImageBitmapTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698