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

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

Issue 13973026: remove memoryinstrumentation Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove the rest part of MemoryInstrumentation Created 7 years, 8 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/loader/DocumentLoader.h ('k') | Source/core/loader/FrameLoader.h » ('j') | 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) 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "Logging.h" 51 #include "Logging.h"
52 #include "MHTMLArchive.h" 52 #include "MHTMLArchive.h"
53 #include "MemoryCache.h" 53 #include "MemoryCache.h"
54 #include "Page.h" 54 #include "Page.h"
55 #include "ProgressTracker.h" 55 #include "ProgressTracker.h"
56 #include "ResourceLoader.h" 56 #include "ResourceLoader.h"
57 #include "SchemeRegistry.h" 57 #include "SchemeRegistry.h"
58 #include "SecurityPolicy.h" 58 #include "SecurityPolicy.h"
59 #include "Settings.h" 59 #include "Settings.h"
60 #include "TextResourceDecoder.h" 60 #include "TextResourceDecoder.h"
61 #include "WebCoreMemoryInstrumentation.h"
62 #include <wtf/Assertions.h> 61 #include <wtf/Assertions.h>
63 #include <wtf/MemoryInstrumentationHashMap.h>
64 #include <wtf/MemoryInstrumentationHashSet.h>
65 #include <wtf/MemoryInstrumentationVector.h>
66 #include <wtf/text/CString.h> 62 #include <wtf/text/CString.h>
67 #include <wtf/text/WTFString.h> 63 #include <wtf/text/WTFString.h>
68 #include <wtf/unicode/Unicode.h> 64 #include <wtf/unicode/Unicode.h>
69 65
70 namespace WebCore { 66 namespace WebCore {
71 67
72 static void cancelAll(const ResourceLoaderSet& loaders) 68 static void cancelAll(const ResourceLoaderSet& loaders)
73 { 69 {
74 Vector<RefPtr<ResourceLoader> > loadersCopy; 70 Vector<RefPtr<ResourceLoader> > loadersCopy;
75 copyToVector(loaders, loadersCopy); 71 copyToVector(loaders, loadersCopy);
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 if (encoding.isNull()) { 694 if (encoding.isNull()) {
699 userChosen = false; 695 userChosen = false;
700 encoding = response().textEncodingName(); 696 encoding = response().textEncodingName();
701 } 697 }
702 m_writer.setEncoding(encoding, userChosen); 698 m_writer.setEncoding(encoding, userChosen);
703 } 699 }
704 ASSERT(m_frame->document()->parsing()); 700 ASSERT(m_frame->document()->parsing());
705 m_writer.addData(bytes, length); 701 m_writer.addData(bytes, length);
706 } 702 }
707 703
708 void DocumentLoader::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
709 {
710 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Loader);
711 info.addMember(m_frame, "frame");
712 info.addMember(m_cachedResourceLoader, "cachedResourceLoader");
713 info.addMember(m_mainResource, "mainResource");
714 info.addMember(m_resourceLoaders, "resourceLoaders");
715 info.addMember(m_multipartResourceLoaders, "multipartResourceLoaders");
716 info.addMember(m_substituteData, "substituteData");
717 info.addMember(m_pageTitle.string(), "pageTitle.string()");
718 info.addMember(m_overrideEncoding, "overrideEncoding");
719 info.addMember(m_originalRequest, "originalRequest");
720 info.addMember(m_originalRequestCopy, "originalRequestCopy");
721 info.addMember(m_request, "request");
722 info.addMember(m_response, "response");
723 info.addMember(m_pendingSubstituteResources, "pendingSubstituteResources");
724 info.addMember(m_substituteResourceDeliveryTimer, "substituteResourceDeliver yTimer");
725 info.addMember(m_archiveResourceCollection, "archiveResourceCollection");
726 info.addMember(m_archive, "archive");
727 info.addMember(m_resourcesClientKnowsAbout, "resourcesClientKnowsAbout");
728 info.addMember(m_resourcesLoadedFromMemoryCacheForClientNotification, "resou rcesLoadedFromMemoryCacheForClientNotification");
729 info.addMember(m_applicationCacheHost, "applicationCacheHost");
730 }
731
732 void DocumentLoader::dataReceived(CachedResource* resource, const char* data, in t length) 704 void DocumentLoader::dataReceived(CachedResource* resource, const char* data, in t length)
733 { 705 {
734 ASSERT(data); 706 ASSERT(data);
735 ASSERT(length); 707 ASSERT(length);
736 ASSERT_UNUSED(resource, resource == m_mainResource); 708 ASSERT_UNUSED(resource, resource == m_mainResource);
737 ASSERT(!m_response.isNull()); 709 ASSERT(!m_response.isNull());
738 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading()); 710 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading());
739 711
740 if (m_identifierForLoadWithoutResourceLoader) 712 if (m_identifierForLoadWithoutResourceLoader)
741 frameLoader()->notifier()->dispatchDidReceiveData(this, m_identifierForL oadWithoutResourceLoader, data, length, -1); 713 frameLoader()->notifier()->dispatchDidReceiveData(this, m_identifierForL oadWithoutResourceLoader, data, length, -1);
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 commitLoad(resourceData->data(), resourceData->size()); 1146 commitLoad(resourceData->data(), resourceData->size());
1175 } 1147 }
1176 1148
1177 void DocumentLoader::handledOnloadEvents() 1149 void DocumentLoader::handledOnloadEvents()
1178 { 1150 {
1179 m_wasOnloadHandled = true; 1151 m_wasOnloadHandled = true;
1180 applicationCacheHost()->stopDeferringEvents(); 1152 applicationCacheHost()->stopDeferringEvents();
1181 } 1153 }
1182 1154
1183 } // namespace WebCore 1155 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentLoader.h ('k') | Source/core/loader/FrameLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698