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

Side by Side Diff: Source/core/fetch/Resource.cpp

Issue 120513004: Don't expose DocumentWriter to embedding layer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 , m_protectorCount(0) 108 , m_protectorCount(0)
109 , m_preloadResult(PreloadNotReferenced) 109 , m_preloadResult(PreloadNotReferenced)
110 , m_cacheLiveResourcePriority(CacheLiveResourcePriorityLow) 110 , m_cacheLiveResourcePriority(CacheLiveResourcePriorityLow)
111 , m_inLiveDecodedResourcesList(false) 111 , m_inLiveDecodedResourcesList(false)
112 , m_requestedFromNetworkingLayer(false) 112 , m_requestedFromNetworkingLayer(false)
113 , m_inCache(false) 113 , m_inCache(false)
114 , m_loading(false) 114 , m_loading(false)
115 , m_switchingClientsToRevalidatedResource(false) 115 , m_switchingClientsToRevalidatedResource(false)
116 , m_type(type) 116 , m_type(type)
117 , m_status(Pending) 117 , m_status(Pending)
118 , m_needsSynchronousCacheHit(false)
118 #ifndef NDEBUG 119 #ifndef NDEBUG
119 , m_deleted(false) 120 , m_deleted(false)
120 , m_lruIndex(0) 121 , m_lruIndex(0)
121 #endif 122 #endif
122 , m_nextInAllResourcesList(0) 123 , m_nextInAllResourcesList(0)
123 , m_prevInAllResourcesList(0) 124 , m_prevInAllResourcesList(0)
124 , m_nextInLiveResourcesList(0) 125 , m_nextInLiveResourcesList(0)
125 , m_prevInLiveResourcesList(0) 126 , m_prevInLiveResourcesList(0)
126 , m_resourceToRevalidate(0) 127 , m_resourceToRevalidate(0)
127 , m_proxyResource(0) 128 , m_proxyResource(0)
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 m_preloadResult = PreloadReferencedWhileComplete; 425 m_preloadResult = PreloadReferencedWhileComplete;
425 else if (m_requestedFromNetworkingLayer) 426 else if (m_requestedFromNetworkingLayer)
426 m_preloadResult = PreloadReferencedWhileLoading; 427 m_preloadResult = PreloadReferencedWhileLoading;
427 else 428 else
428 m_preloadResult = PreloadReferenced; 429 m_preloadResult = PreloadReferenced;
429 } 430 }
430 if (!hasClients() && inCache()) 431 if (!hasClients() && inCache())
431 memoryCache()->addToLiveResourcesSize(this); 432 memoryCache()->addToLiveResourcesSize(this);
432 433
433 // If we have existing data to send to the new client and the resource type supprts it, send it asynchronously. 434 // If we have existing data to send to the new client and the resource type supprts it, send it asynchronously.
434 if (!m_response.isNull() && !m_proxyResource && !shouldSendCachedDataSynchro nouslyForType(type())) { 435 if (!m_response.isNull() && !m_proxyResource && !shouldSendCachedDataSynchro nouslyForType(type()) && !m_needsSynchronousCacheHit) {
435 m_clientsAwaitingCallback.add(client); 436 m_clientsAwaitingCallback.add(client);
436 ResourceCallback::callbackHandler()->schedule(this); 437 ResourceCallback::callbackHandler()->schedule(this);
437 return false; 438 return false;
438 } 439 }
439 440
440 m_clients.add(client); 441 m_clients.add(client);
441 return true; 442 return true;
442 } 443 }
443 444
444 void Resource::removeClient(ResourceClient* client) 445 void Resource::removeClient(ResourceClient* client)
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 return "Shader"; 916 return "Shader";
916 case Resource::ImportResource: 917 case Resource::ImportResource:
917 return "ImportResource"; 918 return "ImportResource";
918 } 919 }
919 ASSERT_NOT_REACHED(); 920 ASSERT_NOT_REACHED();
920 return "Unknown"; 921 return "Unknown";
921 } 922 }
922 #endif // !LOG_DISABLED 923 #endif // !LOG_DISABLED
923 924
924 } 925 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698