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

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

Issue 124943003: Remove 'String::append' from some of the blink source. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removing the CustomFilterValidatedProgram.cpp from the patch(File is deleted in r164847) 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
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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 10 *
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 m_dataBuffer = SharedBuffer::create(data, dataLength); 124 m_dataBuffer = SharedBuffer::create(data, dataLength);
125 else 125 else
126 m_dataBuffer->append(data, dataLength); 126 m_dataBuffer->append(data, dataLength);
127 } 127 }
128 128
129 size_t NetworkResourcesData::ResourceData::decodeDataToContent() 129 size_t NetworkResourcesData::ResourceData::decodeDataToContent()
130 { 130 {
131 ASSERT(!hasContent()); 131 ASSERT(!hasContent());
132 size_t dataLength = m_dataBuffer->size(); 132 size_t dataLength = m_dataBuffer->size();
133 m_content = m_decoder->decode(m_dataBuffer->data(), m_dataBuffer->size()); 133 m_content = m_decoder->decode(m_dataBuffer->data(), m_dataBuffer->size());
134 m_content.append(m_decoder->flush()); 134 m_content = m_content + m_decoder->flush();
135 m_dataBuffer = nullptr; 135 m_dataBuffer = nullptr;
136 return contentSizeInBytes(m_content) - dataLength; 136 return contentSizeInBytes(m_content) - dataLength;
137 } 137 }
138 138
139 // NetworkResourcesData 139 // NetworkResourcesData
140 NetworkResourcesData::NetworkResourcesData() 140 NetworkResourcesData::NetworkResourcesData()
141 : m_contentSize(0) 141 : m_contentSize(0)
142 , m_maximumResourcesContentSize(maximumResourcesContentSize) 142 , m_maximumResourcesContentSize(maximumResourcesContentSize)
143 , m_maximumSingleResourceContentSize(maximumSingleResourceContentSize) 143 , m_maximumSingleResourceContentSize(maximumSingleResourceContentSize)
144 { 144 {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 String requestId = m_requestIdsDeque.takeFirst(); 392 String requestId = m_requestIdsDeque.takeFirst();
393 ResourceData* resourceData = resourceDataForRequestId(requestId); 393 ResourceData* resourceData = resourceDataForRequestId(requestId);
394 if (resourceData) 394 if (resourceData)
395 m_contentSize -= resourceData->evictContent(); 395 m_contentSize -= resourceData->evictContent();
396 } 396 }
397 return true; 397 return true;
398 } 398 }
399 399
400 } // namespace WebCore 400 } // namespace WebCore
401 401
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/loader/WorkerThreadableLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698