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

Side by Side Diff: Source/core/platform/network/FormData.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/platform/network/FormData.h ('k') | Source/core/platform/network/ResourceRequest.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) 2004, 2006, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 16 matching lines...) Expand all
27 #include "BlobURL.h" 27 #include "BlobURL.h"
28 #include "Chrome.h" 28 #include "Chrome.h"
29 #include "ChromeClient.h" 29 #include "ChromeClient.h"
30 #include "Document.h" 30 #include "Document.h"
31 #include "File.h" 31 #include "File.h"
32 #include "FileSystem.h" 32 #include "FileSystem.h"
33 #include "FormDataBuilder.h" 33 #include "FormDataBuilder.h"
34 #include "FormDataList.h" 34 #include "FormDataList.h"
35 #include "MIMETypeRegistry.h" 35 #include "MIMETypeRegistry.h"
36 #include "Page.h" 36 #include "Page.h"
37 #include "PlatformMemoryInstrumentation.h"
38 #include "TextEncoding.h" 37 #include "TextEncoding.h"
39 #include <wtf/Decoder.h> 38 #include <wtf/Decoder.h>
40 #include <wtf/Encoder.h> 39 #include <wtf/Encoder.h>
41 #include <wtf/MemoryInstrumentationVector.h>
42 40
43 namespace WebCore { 41 namespace WebCore {
44 42
45 inline FormData::FormData() 43 inline FormData::FormData()
46 : m_identifier(0) 44 : m_identifier(0)
47 , m_hasGeneratedFiles(false) 45 , m_hasGeneratedFiles(false)
48 , m_alwaysStream(false) 46 , m_alwaysStream(false)
49 , m_containsPasswordData(false) 47 , m_containsPasswordData(false)
50 { 48 {
51 } 49 }
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 ASSERT(e.m_shouldGenerateFile); 332 ASSERT(e.m_shouldGenerateFile);
335 String directory = directoryName(e.m_generatedFilename); 333 String directory = directoryName(e.m_generatedFilename);
336 deleteFile(e.m_generatedFilename); 334 deleteFile(e.m_generatedFilename);
337 deleteEmptyDirectory(directory); 335 deleteEmptyDirectory(directory);
338 e.m_generatedFilename = String(); 336 e.m_generatedFilename = String();
339 } 337 }
340 } 338 }
341 m_hasGeneratedFiles = false; 339 m_hasGeneratedFiles = false;
342 } 340 }
343 341
344 void FormData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
345 {
346 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Loader);
347 info.addMember(m_boundary, "boundary");
348 info.addMember(m_elements, "elements");
349 }
350
351 void FormDataElement::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) cons t
352 {
353 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Loader);
354 info.addMember(m_data, "data");
355 info.addMember(m_filename, "filename");
356 info.addMember(m_url, "url");
357 info.addMember(m_generatedFilename, "generatedFilename");
358 }
359
360 static void encodeElement(Encoder& encoder, const FormDataElement& element) 342 static void encodeElement(Encoder& encoder, const FormDataElement& element)
361 { 343 {
362 encoder.encodeUInt32(element.m_type); 344 encoder.encodeUInt32(element.m_type);
363 345
364 switch (element.m_type) { 346 switch (element.m_type) {
365 case FormDataElement::data: 347 case FormDataElement::data:
366 encoder.encodeBytes(reinterpret_cast<const uint8_t*>(element.m_data.data ()), element.m_data.size()); 348 encoder.encodeBytes(reinterpret_cast<const uint8_t*>(element.m_data.data ()), element.m_data.size());
367 return; 349 return;
368 350
369 case FormDataElement::encodedFile: 351 case FormDataElement::encodedFile:
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 if (!decoder.decodeBool(data->m_hasGeneratedFiles)) 484 if (!decoder.decodeBool(data->m_hasGeneratedFiles))
503 return 0; 485 return 0;
504 486
505 if (!decoder.decodeInt64(data->m_identifier)) 487 if (!decoder.decodeInt64(data->m_identifier))
506 return 0; 488 return 0;
507 489
508 return data.release(); 490 return data.release();
509 } 491 }
510 492
511 } // namespace WebCore 493 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/platform/network/FormData.h ('k') | Source/core/platform/network/ResourceRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698