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

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

Issue 1583263002: Experimental CompressibleString UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adopt lazy-initializing way Created 4 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
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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 *result = ""; 209 *result = "";
210 return true; 210 return true;
211 } 211 }
212 212
213 if (cachedResource) { 213 if (cachedResource) {
214 switch (cachedResource->type()) { 214 switch (cachedResource->type()) {
215 case Resource::CSSStyleSheet: 215 case Resource::CSSStyleSheet:
216 *result = toCSSStyleSheetResource(cachedResource)->sheetText(); 216 *result = toCSSStyleSheetResource(cachedResource)->sheetText();
217 return true; 217 return true;
218 case Resource::Script: 218 case Resource::Script:
219 *result = cachedResource->resourceBuffer() ? toScriptResource(cached Resource)->decodedText() : toScriptResource(cachedResource)->script(); 219 *result = cachedResource->resourceBuffer() ? toScriptResource(cached Resource)->decodedText() : toScriptResource(cachedResource)->script().toString() ;
220 return true; 220 return true;
221 case Resource::ImportResource: // Fall through. 221 case Resource::ImportResource: // Fall through.
222 case Resource::Raw: { 222 case Resource::Raw: {
223 SharedBuffer* buffer = cachedResource->resourceBuffer(); 223 SharedBuffer* buffer = cachedResource->resourceBuffer();
224 if (!buffer) 224 if (!buffer)
225 return false; 225 return false;
226 OwnPtr<TextResourceDecoder> decoder = InspectorPageAgent::createReso urceTextDecoder(cachedResource->response().mimeType(), cachedResource->response( ).textEncodingName()); 226 OwnPtr<TextResourceDecoder> decoder = InspectorPageAgent::createReso urceTextDecoder(cachedResource->response().mimeType(), cachedResource->response( ).textEncodingName());
227 if (!decoder) 227 if (!decoder)
228 return encodeCachedResourceContent(cachedResource, hasZeroSize, result, base64Encoded); 228 return encodeCachedResourceContent(cachedResource, hasZeroSize, result, base64Encoded);
229 String content = decoder->decode(buffer->data(), buffer->size()); 229 String content = decoder->decode(buffer->data(), buffer->size());
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 777
778 DEFINE_TRACE(InspectorPageAgent) 778 DEFINE_TRACE(InspectorPageAgent)
779 { 779 {
780 visitor->trace(m_inspectedFrames); 780 visitor->trace(m_inspectedFrames);
781 visitor->trace(m_debuggerAgent); 781 visitor->trace(m_debuggerAgent);
782 visitor->trace(m_inspectorResourceContentLoader); 782 visitor->trace(m_inspectorResourceContentLoader);
783 InspectorBaseAgent::trace(visitor); 783 InspectorBaseAgent::trace(visitor);
784 } 784 }
785 785
786 } // namespace blink 786 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp ('k') | third_party/WebKit/Source/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698